-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
50 lines (41 loc) · 1.46 KB
/
CMakeLists.txt
File metadata and controls
50 lines (41 loc) · 1.46 KB
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 2.8)
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include (SubDirList)
enable_testing()
# binary output path
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${SAE_BINARY_DIR}")
# try enable c++11
# g++ and clang++ need flags to enable c++11
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++11" HAS_CPP11)
if (HAS_CPP11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
# use libc++ on Mac OS X
# by default clang++ will use libstdc++ w/o c++11 support
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
endif ()
# add includes for all
include_directories ("${CMAKE_CURRENT_SOURCE_DIR}")
# add gflag
add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR}/external/gflags")
# add includes for gflags
include_directories ("${gflags_BINARY_DIR}/include")
# add library path for gflags
set(CMAKE_LIBRARY_PATH "${gflags_BINARY_DIR}/lib" ${CMAKE_LIBRARY_PATH})
# add google-glog
add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR}/external/google-glog")
# add includes for google-glog
include_directories ("${google-glog_SOURCE_DIR}/src")
# add library path for google-glog
set(CMAKE_LIBRARY_PATH "${google-glog_BINARY_DIR}" ${CMAKE_LIBRARY_PATH})
# add the core libraries
add_subdirectory (testing)
add_subdirectory (indexing)
add_subdirectory (storage)
add_subdirectory (serialization)
add_subdirectory (zrpc)
add_subdirectory (computing)
# add toolkits
add_all_subdirectories ("${CMAKE_CURRENT_SOURCE_DIR}/toolkit")