path: root/src/corelib/tools/qvector_msvc.cpp
diff options
authorAlexandru Croitor <>2020-08-13 17:16:24 +0200
committerAlexandru Croitor <>2020-08-13 21:36:37 +0200
commit57b94b58df474ebc268993291a669dbad21a1300 (patch)
tree9404616df77fa5b1ca1ba41317664fd7fa4df17c /src/corelib/tools/qvector_msvc.cpp
parent8a0ca71c4a2002b7824ad2d6ef2b4997d7857b71 (diff)
CMake: Allow opting out of global target promotionHEADdev
The endless saga of fighting with qt_find_package and global target promotion. In certain scenarios we want to opt out of target promotion to global scope. One such case is in qttools with WrapLibClang and Threads::Threads. Threads::Threads will be found in the top-level scope via Qt6Dependencies. WrapLibClang is declared in src/ directory scope, and then we try to promote it ands its dependencies to the global scope, via qt_find_package() -> qt_find_package_promote_targets_to_global_scope(). This fails because we can't promote Threads::Threads due to it being added in a different subdirectory scope. Introduce 2 new functions. qt_internal_should_not_promote_package_target_to_global and qt_internal_disable_find_package_global_promotion. The first one is used to disable promotion of targets to global scope in qt_find_package. To mark a target not to be promoted, the second function is used. It will be used by qttools for the WrapLibClang case. Task-number: QTBUG-85877 Change-Id: If6caf10a94999402026517a623ae29e3ab1eeb7f Reviewed-by: Joerg Bornemann <>
Diffstat (limited to 'src/corelib/tools/qvector_msvc.cpp')
0 files changed, 0 insertions, 0 deletions