diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2018-10-17 14:25:23 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2018-10-19 13:54:10 (GMT) |
commit | 15bbff05818607a8287ab5d4584428ec331005ee (patch) | |
tree | 2e3637dc1bf5db33594fbc26669ac57966611aa7 /Modules/BundleUtilities.cmake | |
parent | 65bea5b90bcee773dba7e958fcdc704c93cca280 (diff) | |
download | CMake-15bbff05818607a8287ab5d4584428ec331005ee.zip CMake-15bbff05818607a8287ab5d4584428ec331005ee.tar.gz CMake-15bbff05818607a8287ab5d4584428ec331005ee.tar.bz2 |
DeployQt4: Do not include BundleUtilities at configure time
Due to CMP0080, BundleUtilities can no longer be included at
configure-time. However, DeployQt4 contains some functions which
are meant to be used at configure-time, and some which are meant
to be used at install-time and use BundleUtilities. This change
breaks the file into two sections: common functions and install-time
functions. BundleUtilities is now only included at install-time,
thus fixing the policy warning.
Fixes: #18466
Diffstat (limited to 'Modules/BundleUtilities.cmake')
-rw-r--r-- | Modules/BundleUtilities.cmake | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 31db25a..613ba1a 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -224,17 +224,21 @@ that are already also in the bundle... Anything that points to an external file causes this function to fail the verification. #]=======================================================================] +function(_warn_cmp0080) + message(AUTHOR_WARNING + "Policy CMP0080 is not set: BundleUtilities prefers not to be included at configure time. " + "Run \"cmake --help-policy CMP0080\" for policy details. " + "Use the cmake_policy command to set the policy and suppress this warning." + ) +endfunction() + # Do not include this module at configure time! if(DEFINED CMAKE_GENERATOR) cmake_policy(GET CMP0080 _BundleUtilities_CMP0080) if(_BundleUtilities_CMP0080 STREQUAL "NEW") message(FATAL_ERROR "BundleUtilities cannot be included at configure time!") - elseif(NOT _BundleUtilities_CMP0080 STREQUAL "OLD") - message(AUTHOR_WARNING - "Policy CMP0080 is not set: BundleUtilities prefers not to be included at configure time. " - "Run \"cmake --help-policy CMP0080\" for policy details. " - "Use the cmake_policy command to set the policy and suppress this warning." - ) + elseif(NOT _BundleUtilities_CMP0080 STREQUAL "OLD" AND NOT _CMP0080_SUPPRESS_WARNING) + _warn_cmp0080() endif() endif() |