diff options
author | Andrei Lebedev <lebdron@gmail.com> | 2017-02-26 09:47:57 +0400 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2017-02-25 21:47:57 -0800 |
commit | 695d26183afb75137a128ae73fbd4e873b0fd2aa (patch) | |
tree | bac929dd7afc1f1aeac40bae303bf9b2bf9da0a6 /CMakeLists.txt | |
parent | f5120a2aafa866f58aa5cbcf96cc06bb179a89f3 (diff) | |
download | flatbuffers-695d26183afb75137a128ae73fbd4e873b0fd2aa.tar.gz flatbuffers-695d26183afb75137a128ae73fbd4e873b0fd2aa.tar.bz2 flatbuffers-695d26183afb75137a128ae73fbd4e873b0fd2aa.zip |
Remove libc++ and c++abi requirement on Linux with clang (#4189)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ef5085c..bc716102 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,9 +126,14 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") set(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -std=c++0x -stdlib=libc++ -Wall -pedantic -Werror \ + "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -pedantic -Werror \ -Wextra") - if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD") + if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Linux") + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + if(NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "FreeBSD" OR + "${CMAKE_SYSTEM_NAME}" MATCHES "Linux")) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++abi") endif() |