summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-policy.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/opentrack-policy.cmake')
-rw-r--r--cmake/opentrack-policy.cmake47
1 files changed, 22 insertions, 25 deletions
diff --git a/cmake/opentrack-policy.cmake b/cmake/opentrack-policy.cmake
index 2d88e218..5fd8647f 100644
--- a/cmake/opentrack-policy.cmake
+++ b/cmake/opentrack-policy.cmake
@@ -1,27 +1,24 @@
-if(POLICY CMP0020)
- cmake_policy(SET CMP0020 NEW)
-endif()
+include_guard(GLOBAL)
-if(POLICY CMP0058)
- cmake_policy(SET CMP0058 NEW)
-endif()
+set(_policies
+ CMP0020
+ CMP0022
+ CMP0058
+ CMP0028
+ CMP0042
+ CMP0063
+ CMP0053
+ CMP0011
+ CMP0054
+ CMP0012
+ CMP0069
+ CMP0063
+ CMP0074
+)
+foreach(k ${_policies})
+ if(POLICY ${k})
+ cmake_policy(SET ${k} NEW)
+ endif()
+endforeach()
-if(POLICY CMP0028)
- cmake_policy(SET CMP0028 NEW)
-endif()
-
-if(POLICY CMP0042)
- cmake_policy(SET CMP0042 NEW)
-endif()
-
-if(POLICY CMP0063)
- cmake_policy(SET CMP0063 NEW)
-endif()
-
-if(POLICY CMP0053)
- cmake_policy(SET CMP0053 OLD)
-endif()
-
-if(POLICY CMP0011)
- cmake_policy(SET CMP0011 NEW)
-endif()
+set(CMAKE_INSTALL_MESSAGE LAZY)