Commit 2ad9f474 authored by Brad King's avatar Brad King

Set CMake Policies CMP0025 and CMP0042 as necessary

CMake 3.0 introduces these policies to improve default behavior on OS X.
Set them explicitly in VTK to avoid policy warnings.  VTK already works
with the NEW behavior.

Policy CMP0025 affects the project() command when the Apple Clang
compiler is used so we need to set it in all the Examples.  Policy
CMP0042 affects shared libraries on OS X, enabling MACOSX_RPATH by
default.  Set it in directories where we create libraries.  Also tell
KWSys to enable MACOSX_RPATH explicitly instead of setting the policy.

Change-Id: I543b60ee1b8f629adb150e01ee83d99dddb66f46
parent 3a04542c
......@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
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)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (AMR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (LabeledMesh)
......
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.
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
#
# Set the project name.
......
cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT(VTKExamples)
include_regular_expression("^.*$")
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (DataManipulation)
......
......@@ -4,6 +4,9 @@
#-- BSD License: http://www.opensource.org/licenses/bsd-license.html
#--////////////////////////////////////////////////////////////////////////////
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(SimpleCocoaVTK)
if(NOT VTK_BINARY_DIR)
......
......@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(QtEvents)
find_package(VTK COMPONENTS
......
......@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(QtVTKRenderWindows)
find_package(VTK COMPONENTS
......
......@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project( GraphicsView )
find_package(OpenGL)
......
......@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(QtImageViewer)
find_package(VTK COMPONENTS
......
......@@ -2,6 +2,9 @@ cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(SimpleView)
find_package(VTK COMPONENTS
......
cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(HyperTreeGridExamples)
......
cmake_minimum_required (VERSION 2.8.8)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(HyperTreeGridSphere)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (IO)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT(ImageProcessing)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT(LIC)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (Medical)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (Modelling)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (MultiBlock)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (Rendering)
......
cmake_minimum_required(VERSION 2.8.8)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project(VTKStatExample)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (Step1)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (Step2)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (Step3)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (Step4)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (Step5)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
PROJECT (Step6)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (VisualizationAlgorithms)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (VolumeRendering)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW) # CMake 3.0
endif()
project (Widgets)
......
......@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
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)
......
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)
#-----------------------------------------------------------------------------
......
# Copyright (c) 2003,2006 Sandia National Laboratories <cubit@sandia.gov>
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)
set( verdict_MAJOR_VERSION "1")
......
......@@ -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})
SET(KWSYS_PROPERTIES_CXX ${VTK_LIBRARY_PROPERTIES} MACOSX_RPATH 1)
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