summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-policy.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-23 11:37:53 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-23 13:20:22 +0200
commite28c988a04c15c2cedfe7e069a066463f4e4c452 (patch)
tree7eda372353b8d309380ebe1f524e2a136bd818a1 /cmake/opentrack-policy.cmake
parent163c717dec73df7a907821cfb092a2ab6c62286a (diff)
cmake: refactor boilerplate for projects
Don't rely on a macro that shouldn't be necessary. The information "opentrack_boilerplate" retrieves is now factored out to be easily available to projects themselves. opentrack_boilerplate can now also build executables. When appropriate, target properties are now concatenated rather than replaced.
Diffstat (limited to 'cmake/opentrack-policy.cmake')
-rw-r--r--cmake/opentrack-policy.cmake15
1 files changed, 12 insertions, 3 deletions
diff --git a/cmake/opentrack-policy.cmake b/cmake/opentrack-policy.cmake
index 48aba3cc..6416c535 100644
--- a/cmake/opentrack-policy.cmake
+++ b/cmake/opentrack-policy.cmake
@@ -1,10 +1,19 @@
-cmake_policy(SET CMP0020 NEW)
+if(POLICY CMP0020)
+ cmake_policy(SET CMP0020 NEW)
+endif()
+
if(POLICY CMP0058)
- cmake_policy(SET CMP0058 OLD)
+ cmake_policy(SET CMP0058 NEW)
endif()
+
if(POLICY CMP0028)
- cmake_policy(SET CMP0028 OLD)
+ cmake_policy(SET CMP0028 NEW)
endif()
+
if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
+
+if(POLICY CMP0063)
+ cmake_policy(SET CMP0063 NEW)
+endif()