-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
28 lines (25 loc) · 1.09 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
cmake_minimum_required (VERSION 2.8)
project (segmented_tree)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set (CMAKE_CXX_FLAGS "-std=c++11 -Weverything -Wno-c++98-compat \
-Wno-c++98-compat-pedantic -Wno-padded \
-Wno-disabled-macro-expansion -Wno-global-constructors")
set (CMAKE_CXX_FLAGS_DEBUG "-O1 -g -fsanitize=address -fsanitize=undefined")
set (CMAKE_CXX_FLAGS_RELEASE "-O3 -flto")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "-std=c++11 -Wpedantic -Wall -Wextra \
-Wno-missing-field-initializers")
set (CMAKE_CXX_FLAGS_DEBUG "-Og -g")
set (CMAKE_CXX_FLAGS_RELEASE "-O2 -flto")
endif ()
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
add_definitions(-DBOOST_SEGMENTED_TREE_DEBUG)
endif ()
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
include_directories (include)
include_directories (SYSTEM submodule)
include_directories (SYSTEM ${Boost_INCLUDE_DIRS})
add_subdirectory (include/boost/segmented_tree)
add_subdirectory (bench)
add_subdirectory (common)
add_subdirectory (test)