forked from silver-hand/drill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (38 loc) · 1.34 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
cmake_minimum_required(VERSION 2.6)
project(drill CXX C)
set (PROJECT_VERSION_MAJOR 1)
set (PROJECT_VERSION_MINOR 0)
include(${PROJECT_SOURCE_DIR}/cmake/UserOption.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/CheckCompiler.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/Checkheaders.cmake)
include(${PROJECT_SOURCE_DIR}/cmake/Configure.cmake)
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR}) #for config.h
add_subdirectory(drill)
add_subdirectory(live_dispatch)
add_subdirectory(live_dispatch_async)
#########################################
# build test
###########################################################
# add_subdirectory(lib/gtest-1.6.0)
# it will cause cmake infinit loop by reset cache variables,
# so we need manully make gtest before build this project
# like this:
# >cd lib/gtest-1.6.0
# >cmake .
# >make
##############################################################
if(test)
include_directories(${PROJECT_SOURCE_DIR}/lib/gtest-1.6.0/include)
link_directories(${PROJECT_SOURCE_DIR}/lib/gtest-1.6.0/)
##############
# Unit Tests
##############
# enable_testing()
add_subdirectory(test/common)
add_subdirectory(test/http)
add_subdirectory(test/ext)
add_subdirectory(test/httpxx)
endif()
#########################################
include(${PROJECT_SOURCE_DIR}/cmake/Package.cmake)