Commit 14026b16 authored by jcfr's avatar jcfr
Browse files

COMP: Enable CMake policy CMP0001 and update scripts accordingly

CMP0001 : CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@15157 3bd1e089-480b-0410-8dfb-8563597acbee
parent 23b07bc8
......@@ -7,7 +7,6 @@ enable_testing()
if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND CMAKE_POLICY)
mark_as_advanced(CMAKE_BACKWARDS_COMPATIBILITY)
if (Slicer_SOURCE_DIR)
##The current testing suite only works from within Slicer3. Other packages
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# --------------------------------------------------------------------------
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# --------------------------------------------------------------------------
......
......@@ -2,7 +2,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# Calling PROJECT() defines projectname_SOURCE_DIR and projectname_BINARY_DIR
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
IF (Slicer_USE_KWWIDGETS)
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# --------------------------------------------------------------------------
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# --------------------------------------------------------------------------
# Include dirs
......
......@@ -5,7 +5,7 @@ PROJECT(Slicer)
#-----------------------------------------------------------------------------
SET(project_policies
#CMP0001 # NEW: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
CMP0001 # NEW: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
#CMP0002 # NEW: Logical target names must be globally unique.
CMP0003 # NEW: Libraries linked via full path no longer produce linker search paths.
#CMP0004 # NEW: Libraries linked may NOT have leading or trailing whitespace.
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(GenerateCLP REQUIRED)
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
#find_package(KWWidgets REQUIRED)
#include(${KWWidgets_USE_FILE})
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
## ITK is required for expat.h
find_package(ITK REQUIRED)
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# --------------------------------------------------------------------------
# Include dirs
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
SET(MRMLDisplayableManager_USE_PYTHON ${Slicer_USE_PYTHONQT})
# --------------------------------------------------------------------------
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
......
......@@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# --------------------------------------------------------------------------
# Include dirs
......
......@@ -4,9 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
......
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