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