diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-30 04:25:20 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-01-30 14:32:44 (GMT) |
commit | a7c29f3ebdd82000ba7c5e7bcba4db3e73266358 (patch) | |
tree | c255d852d5f7f8223188dc3e1c32ac0c37bef589 /Source | |
parent | 47315d817c8f25c52675ed11401d617f708048be (diff) | |
download | CMake-a7c29f3ebdd82000ba7c5e7bcba4db3e73266358.zip CMake-a7c29f3ebdd82000ba7c5e7bcba4db3e73266358.tar.gz CMake-a7c29f3ebdd82000ba7c5e7bcba4db3e73266358.tar.bz2 |
cmTarget: use static string views for per-config properties
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 5a2fa24..cd431fa 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -4,7 +4,6 @@ #include <algorithm> #include <cassert> -#include <cstring> #include <initializer_list> #include <iterator> #include <map> @@ -724,10 +723,10 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, this->GetType() != cmStateEnums::GLOBAL_TARGET) { static const auto configProps = { /* clang-format needs this comment to break after the opening brace */ - "ARCHIVE_OUTPUT_DIRECTORY_", "LIBRARY_OUTPUT_DIRECTORY_", - "RUNTIME_OUTPUT_DIRECTORY_", "PDB_OUTPUT_DIRECTORY_", - "COMPILE_PDB_OUTPUT_DIRECTORY_", "MAP_IMPORTED_CONFIG_", - "INTERPROCEDURAL_OPTIMIZATION_" + "ARCHIVE_OUTPUT_DIRECTORY_"_s, "LIBRARY_OUTPUT_DIRECTORY_"_s, + "RUNTIME_OUTPUT_DIRECTORY_"_s, "PDB_OUTPUT_DIRECTORY_"_s, + "COMPILE_PDB_OUTPUT_DIRECTORY_"_s, "MAP_IMPORTED_CONFIG_"_s, + "INTERPROCEDURAL_OPTIMIZATION_"_s }; // Collect the set of configuration types. std::vector<std::string> configNames = @@ -738,7 +737,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, // Interface libraries have no output locations, so honor only // the configuration map. if (this->impl->TargetType == cmStateEnums::INTERFACE_LIBRARY && - strcmp(prop, "MAP_IMPORTED_CONFIG_") != 0) { + prop != "MAP_IMPORTED_CONFIG_") { continue; } std::string property = cmStrCat(prop, configUpper); |