Skip to content
Snippets Groups Projects
Commit 96bc743f authored by Andrew Maclean's avatar Andrew Maclean
Browse files

ENH: Eliminate CMP0020 warning.


Eliminate a warning when building in Windows that relates
  to static linking of Qt executables to qtmain.lib.
This policy was introduced in CMake version 2.8.11.
CMake version 2.8.11.2 warns when the policy is not set
  and uses OLD behavior.

This change sets the behaviour to NEW as all the Qt
  executables in VTK link to qtmain.lib.

Change-Id: Ie37e447fda1af40c836da56e6c3f5d5c6ce2b4a1
Signed-off-by: default avatarAndrew Maclean <andrew.amaclean@gmail.com>
parent 1b50adcd
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,15 @@ if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW)
endif()
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
project(VTK)
# Objective-C++ compile flags, future CMake versions might make this obsolete
......
project(QtEvents)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
......
......@@ -2,6 +2,15 @@ cmake_minimum_required(VERSION 2.6)
project(QtVTKRenderWindows)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
......
project(QtImageViewer)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
......
project(SimpleView)
# Eliminate a warning when building in Windows that relates
# to static linking of Qt executables to qtmain.lib.
# This policy was introduced in CMake version 2.8.11.
# CMake version 2.8.11.2 warns when the policy is not set
# and uses OLD behavior.
if(POLICY CMP0020)
cmake_policy(SET CMP0020 NEW)
endif()
if(NOT VTK_BINARY_DIR)
find_package(VTK)
if(NOT VTK_DIR)
......
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