[PATCH] D41568: [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 24 17:24:08 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL321434: [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional… (authored by dhinton, committed by ).
Repository:
rL LLVM
https://reviews.llvm.org/D41568
Files:
llvm/trunk/cmake/config-ix.cmake
llvm/trunk/cmake/modules/CheckAtomic.cmake
llvm/trunk/cmake/modules/CheckCompilerVersion.cmake
Index: llvm/trunk/cmake/config-ix.cmake
===================================================================
--- llvm/trunk/cmake/config-ix.cmake
+++ llvm/trunk/cmake/config-ix.cmake
@@ -17,7 +17,7 @@
if( UNIX AND NOT (BEOS OR HAIKU) )
# Used by check_symbol_exists:
- set(CMAKE_REQUIRED_LIBRARIES m)
+ list(APPEND CMAKE_REQUIRED_LIBRARIES "m")
endif()
# x86_64 FreeBSD 9.2 requires libcxxrt to be specified explicitly.
if( CMAKE_SYSTEM MATCHES "FreeBSD-9.2-RELEASE" AND
Index: llvm/trunk/cmake/modules/CheckCompilerVersion.cmake
===================================================================
--- llvm/trunk/cmake/modules/CheckCompilerVersion.cmake
+++ llvm/trunk/cmake/modules/CheckCompilerVersion.cmake
@@ -28,7 +28,7 @@
# bug in libstdc++4.6 that is fixed in libstdc++4.7.
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
- set(CMAKE_REQUIRED_FLAGS "-std=c++0x")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++0x")
check_cxx_source_compiles("
#include <atomic>
std::atomic<float> x(0.0f);
Index: llvm/trunk/cmake/modules/CheckAtomic.cmake
===================================================================
--- llvm/trunk/cmake/modules/CheckAtomic.cmake
+++ llvm/trunk/cmake/modules/CheckAtomic.cmake
@@ -8,7 +8,7 @@
function(check_working_cxx_atomics varname)
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
- set(CMAKE_REQUIRED_FLAGS "-std=c++11")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11")
CHECK_CXX_SOURCE_COMPILES("
#include <atomic>
std::atomic<int> x;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41568.128122.patch
Type: text/x-patch
Size: 1650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171225/84198676/attachment.bin>
More information about the llvm-commits
mailing list