summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2023-05-31 17:41:48 +0200
committerSlávek Banko <slavek.banko@axis.cz>2023-06-01 06:37:55 +0200
commit4e5ddd484fc887a9b953749de06dfc368741c311 (patch)
tree4632ea2163e1faf7fff24e0e347397bf70b3881c
parent1af8cf351150968aeab5ba7b567b44a06721536d (diff)
downloadtde-cmake-4e5ddd484fc887a9b953749de06dfc368741c311.tar.gz
tde-cmake-4e5ddd484fc887a9b953749de06dfc368741c311.zip
Set CMake policy CMP0057 to NEW.
This is necessary for CheckLinkerFlag with CMake 3.18. Add includes for other checks that are used in TDEMacros. The initialization of the TDEMacros moved to the beginning. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 2e90c1972e733ff0bc9111bfeefd1813ab3363eb)
-rw-r--r--modules/TDEMacros.cmake26
1 files changed, 22 insertions, 4 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index 2afad68..0ff4c17 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -15,10 +15,6 @@
#
#################################################
-include( CheckCXXCompilerFlag )
-include( CheckLinkerFlag OPTIONAL )
-include( TDEVersion )
-
#################################################
#####
@@ -69,6 +65,28 @@ endif()
#################################################
#####
+##### set necessary CMake policies
+
+if( POLICY CMP0057 )
+ # necessary for CheckLinkerFlag
+ cmake_policy( SET CMP0057 NEW )
+endif()
+
+
+#################################################
+#####
+##### necessary includes
+
+include( CheckCXXCompilerFlag )
+include( CheckCXXSourceCompiles )
+include( CheckLinkerFlag OPTIONAL )
+include( CheckSymbolExists )
+include( CheckTypeSize )
+include( TDEVersion )
+
+
+#################################################
+#####
##### tde_message_author_warning
macro( tde_message_author_warning )