Commit 9861cdec authored by Robert Maynard's avatar Robert Maynard
Browse files

Use CMake to automatically set policies to NEW.

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.
parent 2714cbe5
...@@ -53,7 +53,13 @@ ...@@ -53,7 +53,13 @@
# #
# #
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) if (CMAKE_VERSION VERSION_LESS "3.3")
message(FATAL_ERROR "VTK-m requires CMake 3.3+")
endif()
if("${CMAKE_GENERATOR}" MATCHES "Visual Studio" AND
CMAKE_VERSION VERSION_LESS "3.11")
message(FATAL_ERROR "VTK-m requires CMake 3.11+ when using the Visual Studio Generators")
endif()
@PACKAGE_INIT@ @PACKAGE_INIT@
......
...@@ -48,6 +48,7 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb) ...@@ -48,6 +48,7 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
endif() endif()
if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp) if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
cmake_minimum_required(VERSION 3.9...3.12 FATAL_ERROR)
find_package(OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET) find_package(OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET)
add_library(vtkm::openmp INTERFACE IMPORTED GLOBAL) add_library(vtkm::openmp INTERFACE IMPORTED GLOBAL)
...@@ -62,7 +63,7 @@ if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp) ...@@ -62,7 +63,7 @@ if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
endif() endif()
if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda) if(VTKm_ENABLE_CUDA AND NOT TARGET vtkm::cuda)
cmake_minimum_required(VERSION 3.9 FATAL_ERROR) cmake_minimum_required(VERSION 3.9...3.12 FATAL_ERROR)
enable_language(CUDA) enable_language(CUDA)
#To work around https://gitlab.kitware.com/cmake/cmake/issues/17512 #To work around https://gitlab.kitware.com/cmake/cmake/issues/17512
......
...@@ -25,11 +25,11 @@ ...@@ -25,11 +25,11 @@
# If you want CUDA support, you will need to have CMake 3.9 on Linux/OSX. # If you want CUDA support, you will need to have CMake 3.9 on Linux/OSX.
# We require CMake 3.11 with the MSVC generator as the $<COMPILE_LANGUAGE:> # We require CMake 3.11 with the MSVC generator as the $<COMPILE_LANGUAGE:>
# generator expression is not supported on older versions. # generator expression is not supported on older versions.
cmake_minimum_required(VERSION 3.3) cmake_minimum_required(VERSION 3.3...3.12)
project (VTKm) project (VTKm)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio") if(${CMAKE_GENERATOR} MATCHES "Visual Studio")
cmake_minimum_required(VERSION 3.11 FATAL_ERROR) cmake_minimum_required(VERSION 3.11...3.12 FATAL_ERROR)
endif() endif()
# Update module path # Update module path
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(Clipping CXX) project(Clipping CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(ContourTree CXX) project(ContourTree CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(CosmoTools CXX) project(CosmoTools CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(VTKmDemo CXX) project(VTKmDemo CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(GameOfLife CXX) project(GameOfLife CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(HelloWorld CXX) project(HelloWorld CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(Histogram CXX) project(Histogram CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(IsoSurface CXX) project(IsoSurface CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(MultiBackend CXX) project(MultiBackend CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(ParticleAdvection CXX) project(ParticleAdvection CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(RedistributePoints CXX) project(RedistributePoints CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(RenderingExample CXX) project(RenderingExample CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(Streamline CXX) project(Streamline CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(TauTiming CXX) project(TauTiming CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
##============================================================================= ##=============================================================================
#Find the VTK-m package #Find the VTK-m package
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(TemporalAdvection CXX) project(TemporalAdvection CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(Tetrahedra CXX) project(Tetrahedra CXX)
#Find the VTK-m package #Find the VTK-m package
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
## this software. ## this software.
## ##
##============================================================================= ##=============================================================================
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
project(UnifiedMemory CXX) project(UnifiedMemory CXX)
#Find the VTK-m package #Find the VTK-m package
......
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