Skip to content
Snippets Groups Projects
Commit 2ad9f474 authored by Brad King's avatar Brad King
Browse files

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
No related branches found
No related tags found
No related merge requests found
Showing
with 62 additions and 0 deletions
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment