Commit c36289f1 authored by Brad King's avatar Brad King

cmake: declare support for CMake versions through 3.12

CMake 3.12 introduces a `...<max>` syntax in the version given to
`cmake_minimum_required` to automatically set policies to NEW up
to that version.  Use it to avoid listing policies explicitly.

The syntax is compatible with older versions of CMake such that they use
the extended version string for the `CMAKE_MINIMUM_REQUIRED_VERSION`
variable (which we don't use) but otherwise ignore it.
parent 5c48371e
......@@ -139,7 +139,7 @@ set_property(GLOBAL APPEND PROPERTY JOB_POOLS vtkm_pool=${vtkm_pool_size})
if(TARGET vtkm::cuda)
#we are building with CUDA support
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
cmake_minimum_required(VERSION 3.9...3.12 FATAL_ERROR)
enable_language(CUDA)
# Workaround cmake issue #7519 which causes the c++11 flag set for VTK-m using
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
foreach(policy
CMP0074 # CMake 3.12
CMP0075 # CMake 3.12
)
if(POLICY ${policy})
cmake_policy(SET ${policy} NEW)
endif()
endforeach()
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
if(CMAKE_SYSTEM_NAME STREQUAL "Android" AND CMAKE_VERSION VERSION_LESS 3.7)
message(FATAL_ERROR "CMake 3.7 or above is required to build for Android")
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (AMR)
......
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.7...3.12)
project(JavaVTK)
if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
......
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.7...3.12)
project(NativeVTK)
if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
......
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.7...3.12)
project(VolumeRender)
if (CMAKE_BINARY_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (LabeledMesh)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(vtkLocalExample)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
#
# Set the project name.
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT(VTKExamples)
include_regular_expression("^.*$")
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (DataManipulation)
......
......@@ -3,7 +3,7 @@
#-- All rights reserved.
#-- BSD License: http://www.opensource.org/licenses/bsd-license.html
#--////////////////////////////////////////////////////////////////////////////
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(SimpleCocoaVTK)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(QtImageViewer)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (IO)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT(ImageProcessing)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(Infovis)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
foreach(p
CMP0071 # 3.10: Let AUTOMOC and AUTOUIC process GENERATED files
)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (Medical)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (Modelling)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (MultiBlock)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (Rendering)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(VTKStatExample)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (Step1)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (Step2)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (Step3)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (Step4)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (Step5)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
PROJECT (Step6)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (VisualizationAlgorithms)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (VolumeRendering)
......
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project (Widgets)
find_package(VTK REQUIRED)
......
if(NOT VTK_SOURCE_DIR)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(vtkRenderingOpenVR)
find_package(VTK REQUIRED)
endif()
......
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.8...3.12)
find_package( OptiX REQUIRED )
find_package( CUDA 4.0 REQUIRED )
......
# This project builds the test directories from all VTK modules as a separate
# project outside the main VTK build tree as if they were an application.
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(VTKTestExternal)
if(VTK_SOURCE_DIR OR 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