diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-08-23 20:11:33 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-08-23 20:13:49 (GMT) |
commit | 6f1dae2b01b674907c078f9c3aa22999bdfe9f61 (patch) | |
tree | 7c0e938f63079655517e193029bb6ce348f2e93d /Source/cmStandardLevelResolver.cxx | |
parent | 0d45d40e13bea6f8ee1b644441a40ffc18e46318 (diff) | |
download | CMake-6f1dae2b01b674907c078f9c3aa22999bdfe9f61.zip CMake-6f1dae2b01b674907c078f9c3aa22999bdfe9f61.tar.gz CMake-6f1dae2b01b674907c078f9c3aa22999bdfe9f61.tar.bz2 |
cmStandardLevelResolver: use `cmStrCat` where possible
Diffstat (limited to 'Source/cmStandardLevelResolver.cxx')
-rw-r--r-- | Source/cmStandardLevelResolver.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx index 2dbdaab..7d83f7f 100644 --- a/Source/cmStandardLevelResolver.cxx +++ b/Source/cmStandardLevelResolver.cxx @@ -155,8 +155,8 @@ struct StandardLevelComputer << this->Language << *standardProp << "\" " << (ext ? "(with compiler extensions)" : "") << ". But the current compiler \"" - << makefile->GetSafeDefinition("CMAKE_" + this->Language + - "_COMPILER_ID") + << makefile->GetSafeDefinition( + cmStrCat("CMAKE_", this->Language, "_COMPILER_ID")) << "\" does not support this, or " "CMake does not know the flags to enable it."; @@ -474,10 +474,11 @@ bool cmStandardLevelResolver::CheckCompileFeaturesAvailable( std::ostringstream e; e << "The compiler feature \"" << feature << "\" is not known to " << lang << " compiler\n\"" - << this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID") + << this->Makefile->GetSafeDefinition( + cmStrCat("CMAKE_", lang, "_COMPILER_ID")) << "\"\nversion " - << this->Makefile->GetSafeDefinition("CMAKE_" + lang + - "_COMPILER_VERSION") + << this->Makefile->GetSafeDefinition( + cmStrCat("CMAKE_", lang, "_COMPILER_VERSION")) << '.'; if (error) { *error = e.str(); @@ -561,8 +562,8 @@ cmValue cmStandardLevelResolver::CompileFeaturesAvailable( return nullptr; } - cmValue featuresKnown = - this->Makefile->GetDefinition("CMAKE_" + lang + "_COMPILE_FEATURES"); + cmValue featuresKnown = this->Makefile->GetDefinition( + cmStrCat("CMAKE_", lang, "_COMPILE_FEATURES")); if (!cmNonempty(featuresKnown)) { std::ostringstream e; @@ -572,10 +573,11 @@ cmValue cmStandardLevelResolver::CompileFeaturesAvailable( e << "No"; } e << " known features for " << lang << " compiler\n\"" - << this->Makefile->GetSafeDefinition("CMAKE_" + lang + "_COMPILER_ID") + << this->Makefile->GetSafeDefinition( + cmStrCat("CMAKE_", lang, "_COMPILER_ID")) << "\"\nversion " - << this->Makefile->GetSafeDefinition("CMAKE_" + lang + - "_COMPILER_VERSION") + << this->Makefile->GetSafeDefinition( + cmStrCat("CMAKE_", lang, "_COMPILER_VERSION")) << '.'; if (error) { *error = e.str(); |