-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCMakeLists.txt
84 lines (75 loc) · 2.1 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
cmake_minimum_required (VERSION 3.10.3)
project (zchecker)
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
enable_language(CUDA)
endif()
set (CMAKE_DISABLE_SOURCE_CHANGES ON)
set (CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
SET(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=-Wall")
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/zc/include)
#include_directories (${CUDA_TOOLKIT_ROOT_DIR}/samples/common/inc)
include_directories (/usr/local/cuda/samples/common/inc)
if (NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED True)
endif ()
#find_package (MPI)
#if (MPI_FOUND)
# set (CMAKE_C_COMPILER ${MPI_C_COMPILER})
# set (CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
# add_definitions (-DHAVE_MPI)
#endif ()
#
#find_package (R)
#if (R_FOUND)
# include_directories (${R_INCLUDE_DIR})
# add_definitions (-DHAVE_R)
#endif ()
#
#find_package (ZLIB REQUIRED)
#include_directories (${ZLIB_INCLUDE_DIRS})
#
#find_package (SZ)
#if (SZ_FOUND)
# include_directories (${SZ_INCLUDES})
#endif ()
#
#find_package (FFTW)
#if (FFTW_FOUND)
# include_directories (${FFTW_INCLUDES})
# add_definitions (-DHAVE_FFTW3)
#endif ()
#
#find_package (NETCDF)
#if (NETCDF_FOUND)
# include_directories (${NETCDF_INCLUDE_DIRS})
#endif ()
#
#find_package (RocksDB)
#if (RocksDB_FOUND)
# include_directories (${RocksDB_INCLUDE_DIR})
# add_definitions (-DHAVE_ROCKSDB)
#else ()
# find_package (LevelDB)
# if (LevelDB_FOUND)
# include_directories (${LevelDB_INCLUDE_DIR})
# add_definitions (-DHAVE_LEVELDB)
# endif ()
#endif ()
find_package (Threads REQUIRED)
find_package (Boost COMPONENTS system)
if (Boost_SYSTEM_FOUND)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
include_directories (${Boost_INCLUDE_DIRS})
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/zserver)
add_definitions (-DHAVE_ONLINEVIS)
add_subdirectory (zserver)
endif ()
add_subdirectory (zc)
add_subdirectory (examples)