forked from XiaoMi/rdsn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (23 loc) · 996 Bytes
/
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
cmake_minimum_required(VERSION 2.8.8)
#set(DSN_DEBUG_CMAKE TRUE)
include(bin/dsn.cmake)
#cmake_policy(SET CMP0048 NEW)
#project(dsn VERSION 1.0 LANGUAGES C CXX)
project(dsn C CXX)
set(DSN_BUILD_RUNTIME TRUE)
add_definitions(-DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=0)
if(DEFINED WARNING_ALL)
#add_compile_options("-Wall")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall")
endif()
OPTION(ENABLE_GCOV "Enable gcov (debug, Linux builds only)" OFF)
if(ENABLE_GCOV AND UNIX)
#add_compile_options("-fprofile-arcs" "-ftest-coverage")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -DENABLE_GCOV")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -DENABLE_GCOV")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage -lgcov")
endif()
dsn_common_setup()
dsn_add_pseudo_projects()
add_subdirectory(src)