Commit cd0b6e68 authored by Brad King's avatar Brad King

Set MACOSX_RPATH property default consistently across CMake versions

The MACOSX_RPATH target property was introduced in CMake 2.8.12, but we
currently allow CMake 2.8.8.  Set CMAKE_MACOSX_RPATH to 0 by default
so that we get consistent behavior across all versions of CMake.
Leave a comment explaining when the default should be updated.

Now that we set a MACOSX_RPATH default explicitly, we no longer need to
set CMake Policy CMP0042 as was added in commit 2ad9f474 (Set CMake
Policies CMP0025 and CMP0042 as necessary, 2014-03-11), so remove it.

Change-Id: I8af24a728379176b9e7ab933206eaa956e1c60f2
parent a12f60fe
......@@ -4,13 +4,19 @@ foreach(p
CMP0020 # CMake 2.8.11
CMP0022 # CMake 2.8.12
CMP0025 # CMake 3.0
CMP0042 # CMake 3.0
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
endif()
endforeach()
# Set a consistent MACOSX_RPATH default across all CMake versions.
# When CMake 2.8.12 is required, change this default to 1.
# When CMake 3.0.0 is required, remove this block (see CMP0042).
if(NOT DEFINED CMAKE_MACOSX_RPATH)
set(CMAKE_MACOSX_RPATH 0)
endif()
project(VTK)
# Objective-C++ compile flags.
......
......@@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # CMake 3.0
endif()
project(vtkLocalExample)
# Find and load VTK settings.
......
......@@ -6,7 +6,6 @@ foreach(p
CMP0020 # CMake 2.8.11
CMP0022 # CMake 2.8.12
CMP0025 # CMake 3.0
CMP0042 # CMake 3.0
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
......
......@@ -2,9 +2,6 @@ cmake_minimum_required (VERSION 2.8)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # CMake 3.0
endif()
PROJECT (HDF5 C CXX)
......
......@@ -3,9 +3,6 @@ cmake_minimum_required(VERSION 2.8.2)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW) # CMake 3.0
endif()
project(verdict)
......
......@@ -15,7 +15,7 @@ SET(KWSYS_USE_FundamentalType 1)
SET(KWSYS_USE_MD5 1)
SET(KWSYS_USE_Glob 1)
set(KWSYS_HEADER_ROOT ${CMAKE_CURRENT_BINARY_DIR})
SET(KWSYS_PROPERTIES_CXX ${VTK_LIBRARY_PROPERTIES} MACOSX_RPATH 1)
SET(KWSYS_PROPERTIES_CXX ${VTK_LIBRARY_PROPERTIES})
SET(KWSYS_INSTALL_EXPORT_NAME ${VTK_INSTALL_EXPORT_NAME})
if(NOT VTK_INSTALL_NO_LIBRARIES)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment