summaryrefslogtreecommitdiffstats
path: root/cmake/QtProcessConfigureArgs.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-03-25 21:24:52 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-03-31 16:37:39 +0200
commitf64ccc5f535857fd5945f4029b41d2c099e96a79 (patch)
treef8772d71bbd1f90d457f7e3a644f364deb13fad8 /cmake/QtProcessConfigureArgs.cmake
parent293d556fb4f870929b5cbb04b99cc29bb7445cee (diff)
Make find_package in configure.cmake a hard error
qt3d/9a473a3c9b246f4895ae73d7060745b8b199a6c5 introduced a find_package call in a configure.cmake file, very subtly breaking top-level builds with configure. The find_package call results in errors of the cmake call that runs QtProcessConfigureArgs.cmake (see bug report for details). Create a find_package stub that errors out with a helpful message. Task-number: QTBUG-92163 Change-Id: I06db0bf219b965e93b78c690e9f7ad868196ddb9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtProcessConfigureArgs.cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index cecf7a681f..cab1db7f04 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -114,6 +114,11 @@ function(qt_feature feature)
set_property(GLOBAL PROPERTY COMMANDLINE_FEATURE_SECTION_${feature} "${arg_SECTION}")
endfunction()
+function(find_package)
+ message(FATAL_ERROR "find_package must not be used directly in configure.cmake. "
+ "Use qt_find_package or guard the call with an if(NOT QT_CONFIGURE_RUNNING) block.")
+endfunction()
+
macro(defstub name)
function(${name})
endfunction()