-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (42 loc) · 1.53 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
cmake_minimum_required(VERSION 3.9)
project(libdl VERSION 0.1
DESCRIPTION "Small Deep Learning Library"
LANGUAGES CXX)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()
find_package(Git QUIET)
if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
message(STATUS "update submodules")
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMOD_RESULT)
if(NOT GIT_SUBMOD_RESULT EQUAL "0")
message(FATAL_ERROR "could not fetch git submodules")
endif()
endif()
find_package(Doxygen OPTIONAL_COMPONENTS dot mscgen dia)
if(DOXYGEN_FOUND)
set(DOXYGEN_OUTPUT_DIRECTORY doc)
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "README.md")
doxygen_add_docs(doxygen
"${PROJECT_SOURCE_DIR}/src/"
"${PROJECT_SOURCE_DIR}/README.md"
COMMENT "Generate documentation")
endif()
find_package(OpenMP REQUIRED)
add_subdirectory(extern/eigen)
add_subdirectory(extern/spdlog)
add_subdirectory(extern/pybind11)
add_subdirectory(extern/Catch2)
add_subdirectory(src)
add_subdirectory(bindings)
add_subdirectory(samples/xor)
add_subdirectory(samples/digits)
add_subdirectory(samples/digits_cnn)
add_subdirectory(samples/python/digits)
add_subdirectory(samples/python/artifacts)
add_subdirectory(tests)