diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2023-08-02 17:53:37 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2024-03-11 13:48:01 +0100 |
commit | c668dd4044283b6eac86f7ab8177595e207567d7 (patch) | |
tree | aee05a977936c63483ef4f8d2aed15245e70d30d /cmake | |
parent | 31c5d50e84b210843ccdec58a86c4fce3125b679 (diff) |
CMake: Disable ExternalProject examples for -debug-and-release builds
Unfortunately when using CMake <= 3.27 together with
-debug-and-release, it's not possible to reliably build examples as
external projects due to clobbered files in the same build dir.
Disable building examples as EPs in such a case.
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Icea9fdab47986c2608e1952a0bbae72365ac7a62
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtBuildOptionsHelpers.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/QtBuildOptionsHelpers.cmake b/cmake/QtBuildOptionsHelpers.cmake index fbf2aa2b79..5fe3494bb9 100644 --- a/cmake/QtBuildOptionsHelpers.cmake +++ b/cmake/QtBuildOptionsHelpers.cmake @@ -306,7 +306,11 @@ macro(qt_internal_setup_build_examples) "Install example sources as part of the default 'install' target" ON) # FIXME: Support prefix builds as well QTBUG-96232 - if(QT_WILL_INSTALL) + # We don't want to enable EP examples with -debug-and-release because starting with CMake 3.24 + # ExternalProject_Add ends up creating build rules twice, once for each configuration, in the + # same build dir, which ends up causing various issues due to concurrent builds as well as + # clobbered CMakeCache.txt and ninja files. + if(QT_WILL_INSTALL OR QT_FEATURE_debug_and_release) set(_qt_build_examples_as_external OFF) else() set(_qt_build_examples_as_external ON) |