summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-11-27 18:19:45 (GMT)
committerBrad King <brad.king@kitware.com>2018-11-27 18:20:34 (GMT)
commitcb6229b8b8aabfc9700dae88485c89738af928bc (patch)
tree986b8a6d4931d5926d91fadcf1d26fca78193297 /Source/cmGlobalXCodeGenerator.cxx
parentf49efe283ed005aac642f5af58ea971d468de88c (diff)
downloadCMake-cb6229b8b8aabfc9700dae88485c89738af928bc.zip
CMake-cb6229b8b8aabfc9700dae88485c89738af928bc.tar.gz
CMake-cb6229b8b8aabfc9700dae88485c89738af928bc.tar.bz2
clang-tidy: fix warnings in macOS-only code
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 8a38f9b..ac4f0be 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -589,8 +589,7 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
this->CurrentReRunCMakeMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str());
this->CurrentReRunCMakeMakefile += "/ReRunCMake.make";
- cmGeneratedFileStream makefileStream(
- this->CurrentReRunCMakeMakefile.c_str());
+ cmGeneratedFileStream makefileStream(this->CurrentReRunCMakeMakefile);
makefileStream.SetCopyIfDifferent(true);
makefileStream << "# Generated by CMake, DO NOT EDIT\n\n";
@@ -1404,7 +1403,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt)
fname += ".";
fname += cmSystemTools::LowerCase(llang);
{
- cmGeneratedFileStream fout(fname.c_str());
+ cmGeneratedFileStream fout(fname);
fout << "\n";
}
if (cmSourceFile* sf = mf->GetOrCreateSource(fname)) {
@@ -1666,7 +1665,7 @@ void cmGlobalXCodeGenerator::CreateCustomRulesMakefile(
{
std::string makefileName = makefileBasename;
makefileName += configName;
- cmGeneratedFileStream makefileStream(makefileName.c_str());
+ cmGeneratedFileStream makefileStream(makefileName);
if (!makefileStream) {
return;
}
@@ -2864,8 +2863,7 @@ bool cmGlobalXCodeGenerator::CreateGroups(
}
// Add the file to the list of sources.
std::string const& source = sf->GetFullPath();
- cmSourceGroup* sourceGroup =
- mf->FindSourceGroup(source.c_str(), sourceGroups);
+ cmSourceGroup* sourceGroup = mf->FindSourceGroup(source, sourceGroups);
cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(gtgt, sourceGroup);
std::string key = GetGroupMapKeyFromPath(gtgt, source);
this->GroupMap[key] = pbxgroup;
@@ -2878,8 +2876,7 @@ bool cmGlobalXCodeGenerator::CreateGroups(
listfile += "/CMakeLists.txt";
cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(listfile);
std::string const& source = sf->GetFullPath();
- cmSourceGroup* sourceGroup =
- mf->FindSourceGroup(source.c_str(), sourceGroups);
+ cmSourceGroup* sourceGroup = mf->FindSourceGroup(source, sourceGroups);
cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(gtgt, sourceGroup);
std::string key = GetGroupMapKeyFromPath(gtgt, source);
this->GroupMap[key] = pbxgroup;
@@ -3251,7 +3248,7 @@ void cmGlobalXCodeGenerator::ComputeObjectDirArch(cmMakefile* mf)
void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
std::vector<cmXCodeObject*>& targets)
{
- cmGeneratedFileStream makefileStream(this->CurrentXCodeHackMakefile.c_str());
+ cmGeneratedFileStream makefileStream(this->CurrentXCodeHackMakefile);
if (!makefileStream) {
cmSystemTools::Error("Could not create",
this->CurrentXCodeHackMakefile.c_str());
@@ -3392,7 +3389,7 @@ void cmGlobalXCodeGenerator::OutputXCodeProject(
xcodeDir += ".xcodeproj";
cmSystemTools::MakeDirectory(xcodeDir.c_str());
std::string xcodeProjFile = xcodeDir + "/project.pbxproj";
- cmGeneratedFileStream fout(xcodeProjFile.c_str());
+ cmGeneratedFileStream fout(xcodeProjFile);
fout.SetCopyIfDifferent(true);
if (!fout) {
return;
@@ -3469,7 +3466,7 @@ void cmGlobalXCodeGenerator::OutputXCodeWorkspaceSettings(
std::string workspaceSettingsFile = xcodeSharedDataDir;
workspaceSettingsFile += "/WorkspaceSettings.xcsettings";
- cmGeneratedFileStream fout(workspaceSettingsFile.c_str());
+ cmGeneratedFileStream fout(workspaceSettingsFile);
fout.SetCopyIfDifferent(true);
if (!fout) {
return;