Commit bb20b9df authored by Andrew Maclean's avatar Andrew Maclean

Eliminating CMP0020 warnings in the examples.

If VTK is built with Qt5 and CMake >= 2.8.11 CMP0020 warnings are generated
 in these examples. Setting CMP0020 to new eliminates these warnings.

This warning happens because the examples link to ${VTK_LIBRARIES}
which, inside the VTK build tree, is all libraries built including
those that use Qt.  The policy is set as a workaround in these cases.

A future submission will modify these and other examples to just
use the needed libraries.

Change-Id: Iea460773065ed55880b198eeaeec3da3b711c258
Signed-off-by: Andrew Maclean's avatarAndrew Maclean <andrew.amaclean@gmail.com>
parent 9bb44b30
......@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
PROJECT (AMR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
if(NOT VTK_SOURCE_DIR)
message(ERROR "Cannot build AMR examples without VTK_SOURCE_DIR")
endif()
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (LabeledMesh)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (DataManipulation)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (IO)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT(ImageProcessing)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT(LIC)
if(NOT VTK_SOURCE_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Medical)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Modelling)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (MultiBlock)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Rendering)
if(NOT VTK_SOURCE_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Step1)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Step2)
IF(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Step3)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Step4)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Step5)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Step6)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (VisualizationAlgorithms)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (VolumeRendering)
if(NOT VTK_BINARY_DIR)
......
cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW) # remove if CMake >= 2.8.11 required
endif()
PROJECT (Widgets)
if(NOT VTK_BINARY_DIR)
......
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