aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorredfish <redfish@galactica.pw>2016-07-10 18:54:48 -0400
committerredfish <redfish@galactica.pw>2016-07-10 21:19:16 -0400
commit4dce26bba4a14fc5398780697504eb7ea3fba245 (patch)
tree53c60f3c18a202d974ded2010b563ed09c8cc6f7 /CMakeLists.txt
parentMerge pull request #889 (diff)
downloadmonero-4dce26bba4a14fc5398780697504eb7ea3fba245.tar.xz
cmake: do not pass -stdlib=c++ to clang >=3.7
Tested on Linux (Arch) with clang 3.7 and 3.8 i686 and ARM: if -stdlib=c++ is passed to clang, then the build errors out with <string>,<iostrea>,etc. headers not found. Simply not passing the arg fixes the problem. **NOTE**: not tested on OSX.
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b9c81895..d266671ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -392,8 +392,10 @@ else()
# There is a clang bug that does not allow to compile code that uses AES-NI intrinsics if -flto is enabled, so explicitly disable
set(USE_LTO false)
# explicitly define stdlib for older versions of clang
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
+ if(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.7)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
+ endif()
endif()