From 2e90c1972e733ff0bc9111bfeefd1813ab3363eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Wed, 31 May 2023 17:41:48 +0200 Subject: [PATCH] Set CMake policy CMP0057 to NEW. This is necessary for CheckLinkerFlag with CMake 3.18. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- modules/TDEMacros.cmake | 26 ++++++++++++++++++++++---- 1 file 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 ) - ################################################# ##### @@ -67,6 +63,28 @@ if( NOT TDE_CMAKE_ROOT ) 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