-
Notifications
You must be signed in to change notification settings - Fork 20
/
CMakeLists.txt
32 lines (24 loc) · 978 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
27
28
29
30
31
cmake_minimum_required(VERSION 3.0)
project(AllocatorBuilder)
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0501)
ENDIF(WIN32)
# Visual Studio 2012 only supports up to 8 template parameters in
# std::tr1::tuple by default, but gtest requires 10
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" AND MSVC_VERSION EQUAL 1700)
add_definitions(-D_VARIADIC_MAX=10)
endif ()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(CMAKE_CXX_FLAGS "-O3 -fsanitize=thread -g -Wall -std=c++11")
set(CMAKE_CXX_FLAGS "-O3 -g -Wall -std=c++14")
set(CMAKE_LINK_FLAGS "-pthreads")
endif()
set(BOOST_ROOT D:/boost_1_59_0)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
#set(BOOST_ALL_DYN_LINK ON)
find_package( Boost 1.55.0 REQUIRED COMPONENTS system thread chrono date_time)
add_subdirectory(util/gtest-1.7.0)
add_subdirectory(source)
add_subdirectory(test)