diff options
author | Brad King <brad.king@kitware.com> | 2024-02-08 16:10:31 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-02-08 16:10:47 (GMT) |
commit | d968391a0f7367bb0c820c83e5f2646a33a94fa3 (patch) | |
tree | 9a86761ff636c97df015366c235e16dd453d5395 /Source | |
parent | 9aba2533113e16a9f60ae84ba3ae11ed37adbe1a (diff) | |
parent | ccaf529c4ead74b514e694af97084871bb6bee90 (diff) | |
download | CMake-d968391a0f7367bb0c820c83e5f2646a33a94fa3.zip CMake-d968391a0f7367bb0c820c83e5f2646a33a94fa3.tar.gz CMake-d968391a0f7367bb0c820c83e5f2646a33a94fa3.tar.bz2 |
Merge topic 'doc-autogen' into release-3.29
ccaf529c4e Autogen: Update Documentation
16cc011fa5 cmQtAutoGenGlobalInitializer: Improve Const-correctness
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9223
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmQtAutoGenGlobalInitializer.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.cxx b/Source/cmQtAutoGenGlobalInitializer.cxx index 5e2f99f..591c53e 100644 --- a/Source/cmQtAutoGenGlobalInitializer.cxx +++ b/Source/cmQtAutoGenGlobalInitializer.cxx @@ -49,7 +49,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer( bool globalAutoGenTarget = false; bool globalAutoRccTarget = false; { - cmMakefile* makefile = localGen->GetMakefile(); + cmMakefile const* makefile = localGen->GetMakefile(); // Detect global autogen target name if (makefile->IsOn("CMAKE_GLOBAL_AUTOGEN_TARGET")) { std::string targetName = @@ -118,7 +118,7 @@ cmQtAutoGenGlobalInitializer::cmQtAutoGenGlobalInitializer( target->GetSafeProperty(this->kw().AUTORCC_EXECUTABLE); // We support Qt4, Qt5 and Qt6 - auto qtVersion = + auto const qtVersion = cmQtAutoGenInitializer::GetQtVersion(target.get(), mocExec); bool const validQt = (qtVersion.first.Major == 4) || (qtVersion.first.Major == 5) || (qtVersion.first.Major == 6); @@ -167,7 +167,7 @@ void cmQtAutoGenGlobalInitializer::GetOrCreateGlobalTarget( { // Test if the target already exists if (localGen->FindGeneratorTargetToUse(name) == nullptr) { - cmMakefile* makefile = localGen->GetMakefile(); + cmMakefile const* makefile = localGen->GetMakefile(); // Create utility target auto cc = cm::make_unique<cmCustomCommand>(); @@ -192,9 +192,10 @@ void cmQtAutoGenGlobalInitializer::GetOrCreateGlobalTarget( void cmQtAutoGenGlobalInitializer::AddToGlobalAutoGen( cmLocalGenerator* localGen, std::string const& targetName) { - auto it = this->GlobalAutoGenTargets_.find(localGen); + auto const it = this->GlobalAutoGenTargets_.find(localGen); if (it != this->GlobalAutoGenTargets_.end()) { - cmGeneratorTarget* target = localGen->FindGeneratorTargetToUse(it->second); + cmGeneratorTarget const* target = + localGen->FindGeneratorTargetToUse(it->second); if (target != nullptr) { target->Target->AddUtility(targetName, false, localGen->GetMakefile()); } @@ -204,9 +205,10 @@ void cmQtAutoGenGlobalInitializer::AddToGlobalAutoGen( void cmQtAutoGenGlobalInitializer::AddToGlobalAutoRcc( cmLocalGenerator* localGen, std::string const& targetName) { - auto it = this->GlobalAutoRccTargets_.find(localGen); + auto const it = this->GlobalAutoRccTargets_.find(localGen); if (it != this->GlobalAutoRccTargets_.end()) { - cmGeneratorTarget* target = localGen->FindGeneratorTargetToUse(it->second); + cmGeneratorTarget const* target = + localGen->FindGeneratorTargetToUse(it->second); if (target != nullptr) { target->Target->AddUtility(targetName, false, localGen->GetMakefile()); } @@ -216,7 +218,7 @@ void cmQtAutoGenGlobalInitializer::AddToGlobalAutoRcc( cmQtAutoGen::ConfigStrings<cmQtAutoGen::CompilerFeaturesHandle> cmQtAutoGenGlobalInitializer::GetCompilerFeatures( std::string const& generator, cmQtAutoGen::ConfigString const& executable, - std::string& error, bool const isMultiConfig, bool UseBetterGraph) + std::string& error, bool const isMultiConfig, bool const UseBetterGraph) { cmQtAutoGen::ConfigStrings<cmQtAutoGen::CompilerFeaturesHandle> res; if (isMultiConfig && UseBetterGraph) { @@ -275,7 +277,7 @@ cmQtAutoGenGlobalInitializer::GetCompilerFeatures( // Check if we have cached features { - auto it = this->CompilerFeatures_.Default.find(executable.Default); + auto const it = this->CompilerFeatures_.Default.find(executable.Default); if (it != this->CompilerFeatures_.Default.end()) { res.Default = it->second; return res; |