From 38855ca1e203cce5285a0212d64bae725a7087c7 Mon Sep 17 00:00:00 2001 From: Brad King <brad.king@kitware.com> Date: Tue, 9 Jan 2018 07:51:33 -0500 Subject: [PATCH] Set CMP0042 explicitly with CMake 3.0 and above Some host projects no longer set `CMAKE_MACOSX_RPATH` explicitly due to requiring CMake 3.0 or above, and now see CMP0042 warnings. Set the policy explicitly in KWSys to avoid the warnings. Host projects can still set `CMAKE_MACOSX_RPATH` to `0` to get the old behavior. Suggested-by: Ken Martin <ken.martin@kitware.com> --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccf4e91..1f4dfc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR) FOREACH(p CMP0025 # CMake 3.0, Compiler id for Apple Clang is now AppleClang. + CMP0042 # CMake 3.0, MACOSX_RPATH is enabled by default. CMP0048 # CMake 3.0, Let the project command manage version variables. CMP0056 # CMake 3.2, Honor link flags in try_compile() source-file signature. CMP0063 # CMake 3.3, Honor visibility properties for all target types. -- GitLab