-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (24 loc) · 1.14 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
cmake_minimum_required(VERSION 3.5)
project(DL)
find_package(Threads REQUIRED)
find_package(CUDA 10.0 REQUIRED)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11 -ggdb -mavx -mssse3 -fopenmp")
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} --expt-relaxed-constexpr")
include_directories(./include)
add_executable(test_socket example/test_net.cpp)
add_executable(test_avx example/test_avx.cpp)
add_executable(mnist example/mnist.cpp)
add_executable(test_graph example/test_graph.cpp)
add_executable(test_threadpool example/test_threadpool.cpp)
add_executable(test_cuda example/test_cuda.cpp)
add_executable(distributed_mnist example/distributed_mnist.cpp)
target_link_libraries(distributed_mnist Threads::Threads)
target_link_libraries(mnist Threads::Threads)
target_link_libraries(test_graph Threads::Threads)
target_link_libraries(test_threadpool Threads::Threads)
CUDA_ADD_LIBRARY(cuda_support src/cuda_impl/add.cu src/cuda_impl/conv.cu src/cuda_impl/mul.cu)
target_link_libraries(distributed_mnist cuda_support)
target_link_libraries(test_cuda cuda_support)
target_link_libraries(test_graph cuda_support)
target_link_libraries(mnist cuda_support)