summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-12-31 21:17:02 -0800
committerGravatar Miika Turkia <miika.turkia@gmail.com>2017-01-01 14:23:49 +0200
commite89c205990d3f34901a978f82628a691fd137a0d (patch)
tree523a4650e16c11bb58d9ca168952f9548eaaea5b /CMakeLists.txt
parent843482ac8b2e0e9ca96aaabedae6d104302ee4a0 (diff)
downloadsubsurface-e89c205990d3f34901a978f82628a691fd137a0d.tar.gz
Mac build: hack to get the correct std C++ lib on Lion
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 991eabaf5..cfeee5b74 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,11 @@ set(CMAKE_MODULE_PATH
#
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND ${CMAKE_SYSTEM_VERSION} MATCHES "11.4.")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")