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
This commit is contained in:
Alex Stewart
2015-05-30 15:51:04 +01:00
parent 5a5526e1d8
commit 2edcd9ee0c
+4 -3
View File
@@ -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)