-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
38 lines (28 loc) · 1.08 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
cmake_minimum_required (VERSION 2.8)
project (nanocubesBenchmark)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(NOT COMPILER_SUPPORTS_CXX11)
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
find_package(Threads REQUIRED)
#
# Boost
#
find_package(Boost 1.48 REQUIRED system)
include_directories(${Boost_INCLUDE_DIRS})
message("---- Boost ----")
message("Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIRS}")
message("Boost_LIBRARIES: ${Boost_LIBRARIES}")
include_directories(thirdparty)
if(APPLE)
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++" CACHE STRING "compile flags" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++" CACHE STRING "compile flags" FORCE)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "Deployment target for OSX" FORCE)
endif(APPLE)
if(UNIX)
set(CMAKE_CXX_FLAGS "-std=c++11 -O3" CACHE STRING "compile flags" FORCE)
endif(UNIX)
add_subdirectory (thirdparty/tiny-process-library)
add_subdirectory (thirdparty/jsoncpp)
add_subdirectory (src)