Skip to content

Commit ce12fbe

Browse files
committed
Upgrade Boost to 1.54.0; support C++11 for Clang in OS X only.
1 parent 2e07a3d commit ce12fbe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

CMakeLists.txt

+10-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ else()
2020
endif()
2121

2222
set(Boost_USE_MULTI_THREADED ON)
23-
find_package( Boost 1.45.0 REQUIRED unit_test_framework system regex date_time thread filesystem program_options chrono )
23+
find_package( Boost 1.54.0 REQUIRED unit_test_framework system regex date_time thread filesystem program_options chrono )
2424
find_package( OpenSSL )
2525
find_package( Threads )
2626
set(CMAKE_VERBOSE_MAKEFILE true)
@@ -37,9 +37,17 @@ endif()
3737
if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
3838
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
3939
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
40-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-depth=256")
40+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
41+
# We want to link in C++11 mode if we're using Clang and on OS X.
42+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-depth=256 -std=c++11 -stdlib=libc++")
43+
else()
44+
# We just add the -Wall and a high enough template depth
45+
# flag for Clang in other systems.
46+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-dempth=256")
47+
endif()
4148
endif()
4249

50+
4351
if (Boost_FOUND)
4452
if (MSVC)
4553
add_definitions(-D_SCL_SECURE_NO_WARNINGS)

0 commit comments

Comments
 (0)