summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-22 14:42:31 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-29 12:39:45 -0500
commit362d6cd234dd8e83577bb72dcbe22949aa9253bf (patch)
tree0e1e97296748e6c755513e342e6937fe719cceee
parentd64adb9267213c0031b376633b70707ddcfc9ba6 (diff)
downloadcmake-362d6cd234dd8e83577bb72dcbe22949aa9253bf.tar.gz
clang-tidy: fix `modernize-raw-string-literal` lints
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx8
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudio9Generator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx2
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx4
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx12
9 files changed, 20 insertions, 20 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 6154d8edce..192663dbb0 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -774,7 +774,7 @@ std::string cmGlobalVisualStudio10Generator::FindMSBuildCommand()
// Search in standard location.
mskey = cmStrCat(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\",
+ R"(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\)",
this->GetToolsVersion(), ";MSBuildToolsPath");
if (cmSystemTools::ReadRegistryValue(mskey, msbuild,
cmSystemTools::KeyWOW64_32)) {
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 3e84765eec..06fd61c9f6 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -101,14 +101,14 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
// check to see if this is a fortran build
std::string ext = ".vcproj";
const char* project =
- "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"";
+ R"(Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = ")";
if (this->TargetIsFortranOnly(t)) {
ext = ".vfproj";
- project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \"";
+ project = R"(Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = ")";
}
if (t->IsCSharpOnly()) {
ext = ".csproj";
- project = "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"";
+ project = R"(Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = ")";
}
cmValue targetExt = t->GetProperty("GENERATOR_FILE_NAME_EXT");
if (targetExt) {
@@ -129,7 +129,7 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
if (ui != this->UtilityDepends.end()) {
const char* uname = ui->second.c_str();
/* clang-format off */
- fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
+ fout << R"(Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = ")"
<< uname << "\", \""
<< this->ConvertToSolutionPath(dir) << (dir[0]? "\\":"")
<< uname << ".vcproj" << "\", \"{"
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index d6eceb1593..a6e824009f 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -169,7 +169,7 @@ std::string cmGlobalVisualStudio7Generator::FindDevEnvCommand()
// Search where VS15Preview places it.
vskey = cmStrCat(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;",
+ R"(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7;)",
this->GetIDEVersion());
if (cmSystemTools::ReadRegistryValue(vskey, vscmd,
cmSystemTools::KeyWOW64_32)) {
@@ -614,7 +614,7 @@ std::string cmGlobalVisualStudio7Generator::WriteUtilityDepend(
/* clang-format off */
fout <<
- "<?xml version=\"1.0\" encoding = \""
+ R"(<?xml version="1.0" encoding = ")"
<< this->Encoding() << "\"?>\n"
"<VisualStudioProject\n"
"\tProjectType=\"Visual C++\"\n"
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 2f252174d4..70cb72abcb 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -53,7 +53,7 @@ std::string cmGlobalVisualStudio8Generator::FindDevEnvCommand()
// First look for VCExpress.
std::string vsxcmd;
std::string vsxkey =
- cmStrCat("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\",
+ cmStrCat(R"(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\)",
this->GetIDEVersion(), ";InstallDir");
if (cmSystemTools::ReadRegistryValue(vsxkey, vsxcmd,
cmSystemTools::KeyWOW64_32)) {
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index cd0b1142e4..9f6550bd72 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -158,5 +158,5 @@ std::string cmGlobalVisualStudio9Generator::GetUserMacrosDirectory()
std::string cmGlobalVisualStudio9Generator::GetUserMacrosRegKeyBase()
{
- return "Software\\Microsoft\\VisualStudio\\9.0\\vsmacros";
+ return R"(Software\Microsoft\VisualStudio\9.0\vsmacros)";
}
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index dd4b2a7267..31f6f77fc3 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -186,7 +186,7 @@ std::string cmGlobalVisualStudioGenerator::GetRegistryBase()
std::string cmGlobalVisualStudioGenerator::GetRegistryBase(const char* version)
{
- std::string key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\";
+ std::string key = R"(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\)";
return key + version;
}
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 256ca1e061..8dd7545c1a 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -65,7 +65,7 @@ static bool VSHasDotNETFrameworkArm64()
{
std::string dotNetArm64;
return cmSystemTools::ReadRegistryValue(
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework;InstallRootArm64",
+ R"(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework;InstallRootArm64)",
dotNetArm64, cmSystemTools::KeyWOW64_64);
}
@@ -530,7 +530,7 @@ bool cmGlobalVisualStudioVersionedGenerator::SetGeneratorInstance(
if (!this->GeneratorInstanceVersion.empty()) {
std::string const majorStr = VSVersionToMajorString(this->Version);
cmsys::RegularExpression versionRegex(
- cmStrCat("^", majorStr, "\\.[0-9]+\\.[0-9]+\\.[0-9]+$"));
+ cmStrCat("^", majorStr, R"(\.[0-9]+\.[0-9]+\.[0-9]+$)"));
if (!versionRegex.find(this->GeneratorInstanceVersion)) {
std::ostringstream e;
/* clang-format off */
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 28e8854416..e1587f82e5 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1980,7 +1980,7 @@ void cmLocalVisualStudio7Generator::WriteProjectStartFortran(
cmGlobalVisualStudio7Generator* gg =
static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator);
/* clang-format off */
- fout << "<?xml version=\"1.0\" encoding = \""
+ fout << R"(<?xml version="1.0" encoding = ")"
<< gg->Encoding() << "\"?>\n"
<< "<VisualStudioProject\n"
<< "\tProjectCreator=\"Intel Fortran\"\n"
@@ -2042,7 +2042,7 @@ void cmLocalVisualStudio7Generator::WriteProjectStart(
static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator);
/* clang-format off */
- fout << "<?xml version=\"1.0\" encoding = \""
+ fout << R"(<?xml version="1.0" encoding = ")"
<< gg->Encoding() << "\"?>\n"
<< "<VisualStudioProject\n"
<< "\tProjectType=\"Visual C++\"\n";
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 147484b2e0..d91723f8d9 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -454,7 +454,7 @@ void cmVisualStudio10TargetGenerator::Generate()
void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
cmGeneratedFileStream& BuildFileStream)
{
- BuildFileStream << "<?xml version=\"1.0\" encoding=\""
+ BuildFileStream << R"(<?xml version="1.0" encoding=")"
<< this->GlobalGenerator->Encoding() << "\"?>";
{
Elem e0(BuildFileStream, "Project");
@@ -726,7 +726,7 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
: customDir +
this->GlobalGenerator
->GetPlatformToolsetCudaVSIntegrationSubdirString() +
- "extras\\visual_studio_integration\\MSBuildExtensions\\";
+ R"(extras\visual_studio_integration\MSBuildExtensions\)";
Elem(e1, "Import")
.Attribute("Project",
std::move(cudaPath) + "CUDA " +
@@ -829,7 +829,7 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile(
: customDir +
this->GlobalGenerator
->GetPlatformToolsetCudaVSIntegrationSubdirString() +
- "extras\\visual_studio_integration\\MSBuildExtensions\\";
+ R"(extras\visual_studio_integration\MSBuildExtensions\)";
Elem(e1, "Import")
.Attribute("Project",
std::move(cudaPath) + "CUDA " +
@@ -1925,7 +1925,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
char magic[] = { char(0xEF), char(0xBB), char(0xBF) };
fout.write(magic, 3);
- fout << "<?xml version=\"1.0\" encoding=\""
+ fout << R"(<?xml version="1.0" encoding=")"
<< this->GlobalGenerator->Encoding() << "\"?>";
{
Elem e0(fout, "Project");
@@ -2905,7 +2905,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions(
if (ttype >= cmStateEnums::UTILITY) {
e1.WritePlatformConfigTag(
- "IntDir", cond, "$(Platform)\\$(Configuration)\\$(ProjectName)\\");
+ "IntDir", cond, R"($(Platform)\$(Configuration)\$(ProjectName)\)");
} else {
std::string intermediateDir = cmStrCat(
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget), '/',
@@ -3594,7 +3594,7 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
// limitation by creating the directory and passing the flag ourselves.
pdb = this->ConvertPath(pdb, true);
ConvertToWindowsSlash(pdb);
- std::string const clFd = "-Xcompiler=\"-Fd\\\"" + pdb + "\\\"\"";
+ std::string const clFd = R"(-Xcompiler="-Fd\")" + pdb + R"(\"")";
cudaOptions.AppendFlagString("AdditionalOptions", clFd);
}
}