-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·67 lines (51 loc) · 1.8 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 2.8)
project(accu2017setup C CXX)
set(CMAKE_SKIP_RPATH OFF)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
#set(CMAKE_CXX_FLAGS "-g -Wall -O3 -std=c++14 -fsanitize=thread -fexceptions -D_GLIBCXX_USE_CXX11_ABI=0")
if (APPLE)
set(CMAKE_CXX_FLAGS "-O3 -g -Wall -std=c++14 -fexceptions -ftemplate-backtrace-limit=0 -D_GLIBCXX_USE_CXX11_ABI=0 -DAPPLE")
else()
set(CMAKE_CXX_FLAGS "-O3 -g -Wall -std=c++14 -fexceptions -ftemplate-backtrace-limit=0 -D_GLIBCXX_USE_CXX11_ABI=0")
endif()
set(CMAKE_LINK_FLAGS "-pthreads")
SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS})
endif()
set (Boost_MULTITHREADED ON)
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0601)
#add_definitions( -DBOOST_ALL_NO_LIB )
#add_definitions( -DBOOST_ALL_DYN_LINK )
set (Boost_USE_STATIC_LIBS ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
else()
set (Boost_USE_STATIC_LIBS ON)
endif(WIN32)
if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
set(CONAN_SYSTEM_INCLUDES ON)
conan_basic_setup()
else()
if(MSVC)
set(Boost_USE_STATIC_LIBS TRUE)
endif()
find_package(Boost 1.60.0 )
if(UNIX)
add_definitions("-DBOOST_TEST_DYN_LINK")
endif()
include_directories(SYSTEM ${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIR})
endif()
set (Boost_MULTITHREADED ON)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package( Threads )
if(CMAKE_USE_PTHREADS_INIT)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-pthread")
endif()
include_directories(.)
include_directories(stlab)
include_directories(nana/include)
add_subdirectory(stlab)
add_subdirectory(nana)
add_subdirectory(SetupStlabTest)
add_subdirectory(SetupNanaTest)