Skip to content

Commit 2f2239c

Browse files
committed
Only use libc++ if in OS X
1 parent 9fbc300 commit 2f2239c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES GNU)
7676
elseif (${CMAKE_CXX_COMPILER_ID} MATCHES Clang)
7777
# We want to link in C++11 mode in Clang too, but also set a high enough
7878
# template depth for the template metaprogramming.
79-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-depth=256 -std=c++11 -stdlib=libc++")
79+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -ftemplate-depth=256 -std=c++11")
80+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
81+
# Use libc++ only in OS X.
82+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
83+
endif()
8084
endif()
8185

8286

0 commit comments

Comments
 (0)