[PATCH] D60847: [CMake] Enable policy CMP0056
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 18:08:59 PDT 2019
phosek created this revision.
phosek added reviewers: smeenai, beanz.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
When this policy is enabled, CMake honors link flags in try_compile().
This is useful when cross-compiling since the CMake checks will use
the value of CMAKE_EXE_LINKER_FLAGS when linking the test executables.
Repository:
rL LLVM
https://reviews.llvm.org/D60847
Files:
llvm/CMakeLists.txt
Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -2,6 +2,10 @@
cmake_minimum_required(VERSION 3.4.3)
+if(POLICY CMP0056)
+ cmake_policy(SET CMP0056 NEW)
+endif()
+
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW)
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60847.195658.patch
Type: text/x-patch
Size: 365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190418/56edaedb/attachment.bin>
More information about the llvm-commits
mailing list