-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (30 loc) · 1.37 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 2.6)
project(Reseau_Neurones)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
endif(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -pedantic")
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
option(test "Build tests." ON)
include_directories("/usr/local/include" ${CMAKE_SOURCE_DIR}/include)
link_directories(${CMAKE_SOURCE_DIR}/lib)
add_executable(ReseauNeurones src/network.cpp src/Neurone.cpp src/Exitateur.cpp src/Inhibiteur.cpp src/main.cpp)
if (test)
enable_testing()
find_package(GTest)
if (NOT GTEST_FOUND)
SET(GTEST_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/include)
SET(GTEST_BOTH_LIBRARIES libgtest.a libgtest_main.a)
endif(NOT GTEST_FOUND)
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(testNeurones src/network.cpp src/Neurone.cpp src/Exitateur.cpp src/Inhibiteur.cpp src/test_neurones.cpp)
target_link_libraries(testNeurones ${GTEST_BOTH_LIBRARIES} pthread)
add_test(Reseau_Neurones testNeurones)
endif(test)
find_package(Doxygen)
if (DOXYGEN_FOUND)
add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM)
endif(DOXYGEN_FOUND)