From 05ea81d3536dfb08e062607d2d3e1d399aa0d827 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Wed, 21 Oct 2015 10:16:32 -0400 Subject: [PATCH] Teach vtk-m CMake about new policies from CMake 3.X.X --- CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 14e6f46d9..5cd14790c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,23 @@ ##============================================================================ cmake_minimum_required(VERSION 2.8.10) + +#setup policy rules for CMake 3.0 while we have a minimum required of 2.8.X +if(POLICY CMP0025) + cmake_policy(SET CMP0025 NEW)#Clang and AppleClang are different compiler ids +endif() + +#setup policy rules for CMake 3.1 while we have a minimum required of 2.8.X +if(POLICY CMP0054) + cmake_policy(SET CMP0053 NEW)#Enable faster parser engine + cmake_policy(SET CMP0054 NEW)#simplify if() argument expansion +endif() + +#setup policy rules for CMake 3.3 while we have a minimum required of 2.8.X +if(POLICY CMP0063) + cmake_policy(SET CMP0063 NEW)#Honor visibility properties for all targets +endif() + project (VTKm) set(VTKm_MAJOR_VERSION 0)