diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-09-24 22:29:17 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-09-25 21:39:35 (GMT) |
commit | 34b393f97f90a5ac7cb4f39f344f5ea99e1d3c03 (patch) | |
tree | 1851403592cd0dda752ca86313e6a57b9fa33539 | |
parent | 43112cbb45cd55b673b95448b65cba1f82bd3c99 (diff) | |
download | CMake-34b393f97f90a5ac7cb4f39f344f5ea99e1d3c03.zip CMake-34b393f97f90a5ac7cb4f39f344f5ea99e1d3c03.tar.gz CMake-34b393f97f90a5ac7cb4f39f344f5ea99e1d3c03.tar.bz2 |
cmGlobalGenerator: use static string views for reserved targets
Also make the array static.
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d5099ee..8734988 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -3142,10 +3142,11 @@ bool cmGlobalGenerator::IsReservedTarget(std::string const& name) // by one or more of the cmake generators. // Adding additional targets to this list will require a policy! - const char* reservedTargets[] = { "all", "ALL_BUILD", "help", - "install", "INSTALL", "preinstall", - "clean", "edit_cache", "rebuild_cache", - "ZERO_CHECK" }; + static const cm::static_string_view reservedTargets[] = { + "all"_s, "ALL_BUILD"_s, "help"_s, "install"_s, + "INSTALL"_s, "preinstall"_s, "clean"_s, "edit_cache"_s, + "rebuild_cache"_s, "ZERO_CHECK"_s + }; return cm::contains(reservedTargets, name); } |