-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
52 lines (42 loc) · 1.09 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
cmake_minimum_required(VERSION 3.0)
project(cnn)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# include(${PROJECT_SOURCE_DIR}/cmake/lint.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/gflags.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/glog.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/compiler-flags.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/protobuf.cmake)
include_directories(include)
add_subdirectory(proto)
add_library(
core STATIC
src/io.cpp
src/rng.cpp
# src/array.cpp
# src/layer.cpp
# src/full_connected_layer.cpp
# src/input_layer.cpp
# src/network.cpp
# src/l2_loss_layer.cpp
# src/array_math.cpp
# src/optimizer.cpp
# src/softmax_layer.cpp
# src/log_loss_layer.cpp
# src/softmax_with_log_loss_layer.cpp
)
target_link_libraries(
core
cnn_proto
${GLOG_LIBRARIES}
${GFLAGS_LIBRARIES}
)
if(UNIX AND NOT APPLE)
target_link_libraries(
core
-pthread
)
endif()
add_subdirectory(test)
add_subdirectory(tools)
add_subdirectory(examples)