Commit 2825b705 authored by Brad King's avatar Brad King
Browse files

Remove copy of CMake module to avoid policy CMP0017

Since commit 8dd19720 (...set examples to require cmake 2.6.3 to match
vtk, 2010-01-13) the entire VTK tree requires CMake 2.6.3 or higher.
These versions of CMake provide the FindPackageHandleStandardArgs module
so we do not need our own copy in VTK anymore.

Removing this module avoids triggering new CMake 2.8.4 policy CMP0017.
Therefore we do not need to set the policy at all.  Revert that portion
of commit 8f14f0a7 (Set CMake 2.8.4 policy CMP0017 to NEW, 2011-01-13).
parent 8f14f0a7
IF(EXISTS "${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
INCLUDE("${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
ELSE(EXISTS "${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
GET_FILENAME_COMPONENT(_CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
INCLUDE("${_CURRENT_DIR}/FindPackageHandleStandardArgs2.cmake")
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake")
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
# This macro is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
# it also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is found if all variables listed are TRUE.
# Example:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set tto TRUE.
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
# independent whether QUIET was used or not.
# If it is found, the location is reported using the VAR1 argument, so
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
# If the second argument is DEFAULT_MSG, the message in the failure case will
# be "Could NOT find LibXml2", if you don't like this message you can specify
# your own custom failure message there.
MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "Could NOT find ${_NAME}")
ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "${_FAIL_MSG}")
ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
STRING(TOUPPER ${_NAME} _NAME_UPPER)
SET(${_NAME_UPPER}_FOUND TRUE)
IF(NOT ${_VAR1})
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(NOT ${_VAR1})
FOREACH(_CURRENT_VAR ${ARGN})
IF(NOT ${_CURRENT_VAR})
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(NOT ${_CURRENT_VAR})
ENDFOREACH(_CURRENT_VAR)
IF (${_NAME_UPPER}_FOUND)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ELSE (${_NAME_UPPER}_FOUND)
IF (${_NAME}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
ELSE (${_NAME}_FIND_REQUIRED)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "${_FAIL_MESSAGE}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ENDIF (${_NAME}_FIND_REQUIRED)
ENDIF (${_NAME_UPPER}_FOUND)
ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
FOREACH(policy CMP0012 CMP0013 CMP0014 CMP0017)
FOREACH(policy CMP0012 CMP0013 CMP0014)
IF(POLICY ${policy})
CMAKE_POLICY(SET ${policy} NEW)
ENDIF()
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
IF(POLICY CMP0017)
CMAKE_POLICY(SET CMP0017 NEW)
ENDIF()
# Set the project/library name here. Classes should be declared as
# "class vtkLocal_EXPORT vtkFoo", where vtkLocal is the name of the
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
IF(POLICY CMP0017)
CMAKE_POLICY(SET CMP0017 NEW)
ENDIF()
#
# Set the project name.
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
IF(POLICY CMP0017)
CMAKE_POLICY(SET CMP0017 NEW)
ENDIF()
PROJECT(VTKExamples)
INCLUDE_REGULAR_EXPRESSION("^.*$")
......
Supports Markdown
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