summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-07-04 17:39:52 +0100
committerPeter Powell <petpow@saberuk.com>2015-12-31 02:41:19 +0000
commit98d7a993e57ec8aa3c5cfbda57a8f991201b2645 (patch)
tree2feff00f7a0f32373426dbe1e117890ae396c43b /CMakeLists.txt
parentdd6688b9875bef4c3ce5e66fd19283ac931b72ea (diff)
Clean up flags passed to the compiler.
- Clang builds on OS X should use libc++ instead of libstdc++. - GCC no longer needs no-long-long as we have C++11 support now. - GCC does not need -fno-leading-underscore.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f9297f88..8075b05d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -89,8 +89,9 @@ else()
# If on a *nix system, also set the compile flags to remove GNU extensions (favor ISO C++) as well as reject non-ISO C++ code, also remove all leading underscores in exported symbols (only on GNU compiler)
if(UNIX)
set(CXXFLAGS "${CXXFLAGS} -ansi -pedantic ${CMAKE_CXX_FLAGS}")
- if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set(CXXFLAGS "${CXXFLAGS} -Wno-long-long -fno-leading-underscore")
+ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")
+ set(CXXFLAGS "${CXXFLAGS} -stdlib=libc++")
+ set(LDFLAGS "${LDFLAGS} -stdlib=libc++")
endif()
endif()
endif()