diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2023-06-02 10:00:03 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2023-06-02 10:04:21 +0200 |
commit | d1c467a7dabf992393da8063606c5f478a974634 (patch) | |
tree | 3ce03a321ce4ccd6e7fcc45920aee9fe1bbaf272 | |
parent | 2e90c1972e733ff0bc9111bfeefd1813ab3363eb (diff) | |
download | tde-cmake-d1c467a7dabf992393da8063606c5f478a974634.tar.gz tde-cmake-d1c467a7dabf992393da8063606c5f478a974634.zip |
Save and restore CMake policies so that it does not cause CMP0011
in the case of use as a slave - tde_automoc, tde_uic.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r-- | modules/TDEMacros.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 0ff4c17..56c9f7f 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -67,6 +67,7 @@ endif() ##### ##### set necessary CMake policies +cmake_policy( PUSH ) if( POLICY CMP0057 ) # necessary for CheckLinkerFlag cmake_policy( SET CMP0057 NEW ) @@ -224,9 +225,15 @@ macro( tde_read_src_metadata ) endmacro( tde_read_src_metadata ) +################################################ +##### +##### finalization as a slave part + if( DEFINED MASTER_SOURCE_DIR ) + cmake_policy( POP ) return( ) endif( ) + ########### slave part ends here ############### @@ -3217,3 +3224,13 @@ macro( tde_setup_polkit ) endif( ) endmacro( ) + + +################################################# +##### +##### restore CMake policies + +cmake_policy( POP ) + + +################################################# |