summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio12Generator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-07-27 16:23:22 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-07-27 23:10:39 (GMT)
commit3f1378fbcab72a849908bbc988254f392d04c41a (patch)
tree0dcf9d2e38272b101fa4bfb12133a22c9fb2def7 /Source/cmGlobalVisualStudio12Generator.cxx
parent7e3b9af191b1ae596b228d8ac3d709eecf8d82d4 (diff)
downloadCMake-3f1378fbcab72a849908bbc988254f392d04c41a.zip
CMake-3f1378fbcab72a849908bbc988254f392d04c41a.tar.gz
CMake-3f1378fbcab72a849908bbc988254f392d04c41a.tar.bz2
strings: compare to static `string_view` instances in Windows-only code
Diffstat (limited to 'Source/cmGlobalVisualStudio12Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio12Generator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index b7af31b..21776fc 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -6,6 +6,8 @@
#include <sstream>
#include <vector>
+#include <cmext/string_view>
+
#include "cmGlobalGenerator.h"
#include "cmGlobalGeneratorFactory.h"
#include "cmGlobalVisualStudioGenerator.h"
@@ -137,8 +139,8 @@ bool cmGlobalVisualStudio12Generator::MatchesGeneratorName(
bool cmGlobalVisualStudio12Generator::ProcessGeneratorToolsetField(
std::string const& key, std::string const& value)
{
- if (key == "host" &&
- (value == "x64" || value == "x86" || value == "ARM64")) {
+ if (key == "host"_s &&
+ (value == "x64"_s || value == "x86"_s || value == "ARM64"_s)) {
this->GeneratorToolsetHostArchitecture = value;
return true;
}
@@ -189,7 +191,7 @@ bool cmGlobalVisualStudio12Generator::InitializeWindowsStore(cmMakefile* mf)
bool cmGlobalVisualStudio12Generator::SelectWindowsPhoneToolset(
std::string& toolset) const
{
- if (this->SystemVersion == "8.1") {
+ if (this->SystemVersion == "8.1"_s) {
if (this->IsWindowsPhoneToolsetInstalled() &&
this->IsWindowsDesktopToolsetInstalled()) {
toolset = "v120_wp81";
@@ -204,7 +206,7 @@ bool cmGlobalVisualStudio12Generator::SelectWindowsPhoneToolset(
bool cmGlobalVisualStudio12Generator::SelectWindowsStoreToolset(
std::string& toolset) const
{
- if (this->SystemVersion == "8.1") {
+ if (this->SystemVersion == "8.1"_s) {
if (this->IsWindowsStoreToolsetInstalled() &&
this->IsWindowsDesktopToolsetInstalled()) {
toolset = "v120";