-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
50 lines (39 loc) · 1.13 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
cmake_minimum_required ( VERSION 3.18.0 )
cmake_policy ( SET CMP0135 NEW )
project ( Glinthawk VERSION 1.0.0 LANGUAGES CXX )
include ( etc/cflags.cmake )
include ( etc/openmp.cmake )
include ( etc/cuda.cmake )
find_package ( OpenSSL REQUIRED )
link_libraries ( OpenSSL::SSL )
find_package ( Glog REQUIRED )
link_libraries ( glog::glog )
set ( Protobuf_USE_STATIC_LIBS ON )
find_package ( Protobuf REQUIRED )
add_subdirectory ( src/message/protobuf )
link_libraries ( glinthawk_proto protobuf::libprotobuf )
include_directories ( src )
include_directories ( SYSTEM "${CMAKE_CURRENT_BINARY_DIR}/src/message/protobuf" )
include_directories ( SYSTEM lib )
file ( GLOB SOURCE_CORE
src/util/*.cc
src/net/*.cc
src/net/http/*.cc
src/storage/*.cc
src/storage/local/*.cc
src/storage/azure/*.cc
src/monitoring/*.cc
src/message/*.cc
src/prompt/*.cc
)
file ( GLOB_RECURSE SOURCE_COMPUTE
src/compute/*.cc
src/worker/*.cc
src/models/*.cc
)
add_library ( glinthawkcore OBJECT ${SOURCE_CORE} )
link_libraries ( glinthawkcore )
add_subdirectory ( targets/amd64 amd64/ )
if ( CUDA_ENABLED )
add_subdirectory ( targets/cuda cuda/ )
endif ()