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.
This commit is contained in:
parent
2714cbe50a
commit
9861cdecb1
@ -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@
|
||||
|
||||
|
@ -48,6 +48,7 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
||||
add_library(vtkm::openmp INTERFACE IMPORTED GLOBAL)
|
||||
@ -62,7 +63,7 @@ if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp)
|
||||
endif()
|
||||
|
||||
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)
|
||||
|
||||
#To work around https://gitlab.kitware.com/cmake/cmake/issues/17512
|
||||
|
@ -25,11 +25,11 @@
|
||||
# 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:>
|
||||
# generator expression is not supported on older versions.
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
cmake_minimum_required(VERSION 3.3...3.12)
|
||||
project (VTKm)
|
||||
|
||||
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()
|
||||
|
||||
# Update module path
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(Clipping CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(ContourTree CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(CosmoTools CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(VTKmDemo CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(GameOfLife CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(HelloWorld CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(Histogram CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(IsoSurface CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(MultiBackend CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(ParticleAdvection CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(RedistributePoints CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(RenderingExample CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(Streamline CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(TauTiming CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -21,7 +21,7 @@
|
||||
##=============================================================================
|
||||
|
||||
#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)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(Tetrahedra CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
@ -19,7 +19,7 @@
|
||||
## this software.
|
||||
##
|
||||
##=============================================================================
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.3...3.12 FATAL_ERROR)
|
||||
project(UnifiedMemory CXX)
|
||||
|
||||
#Find the VTK-m package
|
||||
|
Loading…
Reference in New Issue
Block a user