[PATCH] D39431: [cmake] Make check_linker_flags operate via linker flags
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 30 18:31:12 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316972: [cmake] Make check_linker_flags operate via linker flags (authored by smeenai).
Repository:
rL LLVM
https://reviews.llvm.org/D39431
Files:
llvm/trunk/CMakeLists.txt
llvm/trunk/cmake/modules/CheckLinkerFlag.cmake
Index: llvm/trunk/cmake/modules/CheckLinkerFlag.cmake
===================================================================
--- llvm/trunk/cmake/modules/CheckLinkerFlag.cmake
+++ llvm/trunk/cmake/modules/CheckLinkerFlag.cmake
@@ -1,8 +1,6 @@
include(CheckCXXCompilerFlag)
function(check_linker_flag flag out_var)
- set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
- set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
check_cxx_compiler_flag("" ${out_var})
- set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endfunction()
Index: llvm/trunk/CMakeLists.txt
===================================================================
--- llvm/trunk/CMakeLists.txt
+++ llvm/trunk/CMakeLists.txt
@@ -15,6 +15,10 @@
cmake_policy(SET CMP0051 OLD)
endif()
+if(POLICY CMP0056)
+ cmake_policy(SET CMP0056 NEW)
+endif()
+
if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39431.120920.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171031/cc778781/attachment.bin>
More information about the llvm-commits
mailing list