diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-05-31 17:41:48 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2023-05-31 17:48:58 +0200 |
commit | 2e90c1972e733ff0bc9111bfeefd1813ab3363eb (patch) | |
tree | de746fa92a649db974eb01cf279218335eed761d | |
parent | 4e0406ce01b245209676b944eecfcfc9e55f1602 (diff) | |
download | tde-cmake-2e90c1972e733ff0bc9111bfeefd1813ab3363eb.tar.gz tde-cmake-2e90c1972e733ff0bc9111bfeefd1813ab3363eb.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>
-rw-r--r-- | modules/TDEMacros.cmake | 26 |
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 ) |