mirror of
https://github.com/Sosokker/CPP-Neural-Network.git
synced 2025-12-18 18:14:04 +01:00
Update CMakeLists.txt
This commit is contained in:
parent
777ac49980
commit
bc9a84e3e9
@ -1,32 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(cpp_neural_network)
|
||||
project(CPP-Neural-Network)
|
||||
|
||||
# Set C++ standard
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Add the source files
|
||||
set(SOURCES
|
||||
src/Model/Model.cpp
|
||||
src/utils/Accuracy.cpp
|
||||
src/Optimizer/Optimizer.cpp
|
||||
src/Loss/Loss.cpp
|
||||
src/Layers/Layers.cpp
|
||||
src/ActivationFunction/ActivationFunction.cpp
|
||||
main.cpp
|
||||
)
|
||||
# Set the directories for header files and source files
|
||||
include_directories(include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Eigen)
|
||||
|
||||
# Add executable
|
||||
add_executable(${PROJECT_NAME} ${SOURCES})
|
||||
# Add source files to the project
|
||||
file(GLOB_RECURSE SOURCES "src/*.cpp")
|
||||
|
||||
# Include directories
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Model
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/utils
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Optimizer
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Loss
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Layers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/Activation
|
||||
)
|
||||
# Create the executable
|
||||
add_executable(CPP-Neural-Network ${SOURCES})
|
||||
|
||||
# Link the Eigen library
|
||||
target_include_directories(CPP-Neural-Network PRIVATE ${CMAKE_SOURCE_DIR}/Eigen)
|
||||
|
||||
# Set the output directory for the executable
|
||||
set_target_properties(CPP-Neural-Network PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user