summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorOrkun Tokdemir <orkun.tokdemir@qt.io>2023-03-21 17:18:46 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-24 16:23:47 (GMT)
commit21f812e57c48166ec5529460182d6f266d0ee55e (patch)
tree6e0bcd2537c7045543615b717d4f62656508f9a7 /Source/cmGlobalGenerator.cxx
parentb69441c796827f28742e2b0a4a611c55c7d0ce45 (diff)
downloadCMake-21f812e57c48166ec5529460182d6f266d0ee55e.zip
CMake-21f812e57c48166ec5529460182d6f266d0ee55e.tar.gz
CMake-21f812e57c48166ec5529460182d6f266d0ee55e.tar.bz2
Autogen: Split creation and setup of custom targets into separate steps
Defer the setup step until after compile features have been finalized on normal targets. Later this will help pass the information to Qt tools. Issue: #24624
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx22
1 files changed, 10 insertions, 12 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7ed68d6..d2e129f 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1543,10 +1543,12 @@ bool cmGlobalGenerator::Compute()
return false;
}
- // Iterate through all targets and set up AUTOMOC, AUTOUIC and AUTORCC
- if (!this->QtAutoGen()) {
+#ifndef CMAKE_BOOTSTRAP
+ cmQtAutoGenGlobalInitializer qtAutoGen(this->LocalGenerators);
+ if (!qtAutoGen.InitializeCustomTargets()) {
return false;
}
+#endif
// Add generator specific helper commands
for (const auto& localGen : this->LocalGenerators) {
@@ -1563,6 +1565,12 @@ bool cmGlobalGenerator::Compute()
}
}
+#ifndef CMAKE_BOOTSTRAP
+ if (!qtAutoGen.SetupCustomTargets()) {
+ return false;
+ }
+#endif
+
for (const auto& localGen : this->LocalGenerators) {
cmMakefile* mf = localGen->GetMakefile();
for (const auto& g : mf->GetInstallGenerators()) {
@@ -1764,16 +1772,6 @@ void cmGlobalGenerator::ComputeTargetOrder(cmGeneratorTarget const* gt,
entry->second = index++;
}
-bool cmGlobalGenerator::QtAutoGen()
-{
-#ifndef CMAKE_BOOTSTRAP
- cmQtAutoGenGlobalInitializer initializer(this->LocalGenerators);
- return initializer.generate();
-#else
- return true;
-#endif
-}
-
bool cmGlobalGenerator::AddHeaderSetVerification()
{
for (auto const& gen : this->LocalGenerators) {