From 2edcd9ee0c63cca7f17330efe3e9995ab38b329d Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Sat, 30 May 2015 15:51:04 +0100 Subject: [PATCH] Explicitly use (new) default OS X rpath policy if present. - CMake 3.0+ prefers the use of @rpath, and CMake 3.2+ produces a developer warning if this policy is not set, thus if present we explicitly specify the new default behaviour. - http://www.cmake.org/cmake/help/v3.2/policy/CMP0042.html - Also remove unnecessary check for presence of cmake_policy(), as it exists in all versions of CMake >= 2.8 (our minimum required version). Change-Id: Iacbf8186bee4bf07d8a53068fd528cd6237c5efb --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ab2e314c..e33a43e9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,9 +32,10 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) CMAKE_POLICY(VERSION 2.8) -IF (COMMAND cmake_policy) - CMAKE_POLICY(SET CMP0003 NEW) -ENDIF (COMMAND cmake_policy) +CMAKE_POLICY(SET CMP0003 NEW) +IF (POLICY CMP0042) + CMAKE_POLICY(SET CMP0042 NEW) +ENDIF() PROJECT(CERES C CXX)