Commit da26b3be authored by Rolf Eike Beer's avatar Rolf Eike Beer

avoid adding multiple consecutive string literals to std::string

While at it change some single character additions to be of type char.
parent 06e32a08
Pipeline #144088 passed with stage
...@@ -2223,8 +2223,7 @@ int cmCTestCoverageHandler::GetLabelId(std::string const& label) ...@@ -2223,8 +2223,7 @@ int cmCTestCoverageHandler::GetLabelId(std::string const& label)
void cmCTestCoverageHandler::LoadLabels() void cmCTestCoverageHandler::LoadLabels()
{ {
std::string fileList = this->CTest->GetBinaryDir(); std::string fileList = this->CTest->GetBinaryDir();
fileList += "/CMakeFiles"; fileList += "/CMakeFiles/TargetDirectories.txt";
fileList += "/TargetDirectories.txt";
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
" target directory list [" << fileList << "]\n", " target directory list [" << fileList << "]\n",
this->Quiet); this->Quiet);
......
...@@ -283,8 +283,7 @@ void cmCTestLaunch::LoadLabels() ...@@ -283,8 +283,7 @@ void cmCTestLaunch::LoadLabels()
// Labels are listed in per-target files. // Labels are listed in per-target files.
std::string fname = this->OptionBuildDir; std::string fname = this->OptionBuildDir;
fname += "/CMakeFiles"; fname += "/CMakeFiles/";
fname += "/";
fname += this->OptionTargetName; fname += this->OptionTargetName;
fname += ".dir/Labels.txt"; fname += ".dir/Labels.txt";
......
...@@ -27,8 +27,7 @@ cmCacheManager::cmCacheManager() ...@@ -27,8 +27,7 @@ cmCacheManager::cmCacheManager()
void cmCacheManager::CleanCMakeFiles(const std::string& path) void cmCacheManager::CleanCMakeFiles(const std::string& path)
{ {
std::string glob = path; std::string glob = path;
glob += "/CMakeFiles"; glob += "/CMakeFiles/*.cmake";
glob += "/*.cmake";
cmsys::Glob globIt; cmsys::Glob globIt;
globIt.FindFiles(glob); globIt.FindFiles(glob);
std::vector<std::string> files = globIt.GetFiles(); std::vector<std::string> files = globIt.GetFiles();
......
...@@ -411,8 +411,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv, ...@@ -411,8 +411,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
// compute the binary dir when TRY_COMPILE is called with a src file // compute the binary dir when TRY_COMPILE is called with a src file
// signature // signature
if (this->SrcFileSignature) { if (this->SrcFileSignature) {
this->BinaryDirectory += "/CMakeFiles"; this->BinaryDirectory += "/CMakeFiles/CMakeTmp";
this->BinaryDirectory += "/CMakeTmp";
} else { } else {
// only valid for srcfile signatures // only valid for srcfile signatures
if (!compileDefs.empty()) { if (!compileDefs.empty()) {
......
...@@ -469,8 +469,7 @@ bool HandleStringsCommand(std::vector<std::string> const& args, ...@@ -469,8 +469,7 @@ bool HandleStringsCommand(std::vector<std::string> const& args,
// TODO: should work without temp file, but just on a memory buffer // TODO: should work without temp file, but just on a memory buffer
std::string binaryFileName = std::string binaryFileName =
status.GetMakefile().GetCurrentBinaryDirectory(); status.GetMakefile().GetCurrentBinaryDirectory();
binaryFileName += "/CMakeFiles"; binaryFileName += "/CMakeFiles/FileCommandStringsBinaryFile";
binaryFileName += "/FileCommandStringsBinaryFile";
if (cmHexFileConverter::TryConvert(fileName, binaryFileName)) { if (cmHexFileConverter::TryConvert(fileName, binaryFileName)) {
fileName = binaryFileName; fileName = binaryFileName;
} }
......
...@@ -6442,8 +6442,7 @@ bool cmGeneratorTarget::NeedImportLibraryName(std::string const& config) const ...@@ -6442,8 +6442,7 @@ bool cmGeneratorTarget::NeedImportLibraryName(std::string const& config) const
std::string cmGeneratorTarget::GetSupportDirectory() const std::string cmGeneratorTarget::GetSupportDirectory() const
{ {
std::string dir = this->LocalGenerator->GetCurrentBinaryDirectory(); std::string dir = this->LocalGenerator->GetCurrentBinaryDirectory();
dir += "/CMakeFiles"; dir += "/CMakeFiles/";
dir += "/";
dir += this->GetName(); dir += this->GetName();
#if defined(__VMS) #if defined(__VMS)
dir += "_dir"; dir += "_dir";
......
...@@ -522,7 +522,7 @@ void cmGlobalGenerator::EnableLanguage( ...@@ -522,7 +522,7 @@ void cmGlobalGenerator::EnableLanguage(
if (!this->ConfiguredFilesPath.empty()) { if (!this->ConfiguredFilesPath.empty()) {
rootBin = this->ConfiguredFilesPath; rootBin = this->ConfiguredFilesPath;
} }
rootBin += "/"; rootBin += '/';
rootBin += cmVersion::GetCMakeVersion(); rootBin += cmVersion::GetCMakeVersion();
// set the dir for parent files so they can be used by modules // set the dir for parent files so they can be used by modules
...@@ -1278,8 +1278,7 @@ void cmGlobalGenerator::Configure() ...@@ -1278,8 +1278,7 @@ void cmGlobalGenerator::Configure()
const char* logs[] = { "CMakeOutput.log", "CMakeError.log", nullptr }; const char* logs[] = { "CMakeOutput.log", "CMakeError.log", nullptr };
for (const char** log = logs; *log; ++log) { for (const char** log = logs; *log; ++log) {
std::string f = this->CMakeInstance->GetHomeOutputDirectory(); std::string f = this->CMakeInstance->GetHomeOutputDirectory();
f += "/CMakeFiles"; f += "/CMakeFiles/";
f += "/";
f += *log; f += *log;
if (cmSystemTools::FileExists(f)) { if (cmSystemTools::FileExists(f)) {
msg << "\nSee also \"" << f << "\"."; msg << "\nSee also \"" << f << "\".";
...@@ -2853,8 +2852,7 @@ void cmGlobalGenerator::CheckRuleHashes() ...@@ -2853,8 +2852,7 @@ void cmGlobalGenerator::CheckRuleHashes()
#if !defined(CMAKE_BOOTSTRAP) #if !defined(CMAKE_BOOTSTRAP)
std::string home = this->GetCMakeInstance()->GetHomeOutputDirectory(); std::string home = this->GetCMakeInstance()->GetHomeOutputDirectory();
std::string pfile = home; std::string pfile = home;
pfile += "/CMakeFiles"; pfile += "/CMakeFiles/CMakeRuleHashes.txt";
pfile += "/CMakeRuleHashes.txt";
this->CheckRuleHashes(pfile, home); this->CheckRuleHashes(pfile, home);
this->WriteRuleHashes(pfile); this->WriteRuleHashes(pfile);
#endif #endif
...@@ -2931,8 +2929,7 @@ void cmGlobalGenerator::WriteSummary() ...@@ -2931,8 +2929,7 @@ void cmGlobalGenerator::WriteSummary()
{ {
// Record all target directories in a central location. // Record all target directories in a central location.
std::string fname = this->CMakeInstance->GetHomeOutputDirectory(); std::string fname = this->CMakeInstance->GetHomeOutputDirectory();
fname += "/CMakeFiles"; fname += "/CMakeFiles/TargetDirectories.txt";
fname += "/TargetDirectories.txt";
cmGeneratedFileStream fout(fname); cmGeneratedFileStream fout(fname);
for (cmLocalGenerator* lg : this->LocalGenerators) { for (cmLocalGenerator* lg : this->LocalGenerators) {
......
...@@ -147,9 +147,7 @@ void cmGlobalUnixMakefileGenerator3::Generate() ...@@ -147,9 +147,7 @@ void cmGlobalUnixMakefileGenerator3::Generate()
} }
for (cmLocalGenerator* lg : this->LocalGenerators) { for (cmLocalGenerator* lg : this->LocalGenerators) {
std::string markFileName = lg->GetCurrentBinaryDirectory(); std::string markFileName = lg->GetCurrentBinaryDirectory();
markFileName += "/"; markFileName += "/CMakeFiles/progress.marks";
markFileName += "/CMakeFiles";
markFileName += "/progress.marks";
cmGeneratedFileStream markFile(markFileName); cmGeneratedFileStream markFile(markFileName);
markFile << this->CountProgressMarksInAll(lg) << "\n"; markFile << this->CountProgressMarksInAll(lg) << "\n";
} }
...@@ -198,8 +196,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() ...@@ -198,8 +196,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// see if the build system must be regenerated. // see if the build system must be regenerated.
std::string makefileName = std::string makefileName =
this->GetCMakeInstance()->GetHomeOutputDirectory(); this->GetCMakeInstance()->GetHomeOutputDirectory();
makefileName += "/CMakeFiles"; makefileName += "/CMakeFiles/Makefile2";
makefileName += "/Makefile2";
cmGeneratedFileStream makefileStream(makefileName, false, cmGeneratedFileStream makefileStream(makefileName, false,
this->GetMakefileEncoding()); this->GetMakefileEncoding());
if (!makefileStream) { if (!makefileStream) {
...@@ -258,8 +255,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -258,8 +255,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// see if the build system must be regenerated. // see if the build system must be regenerated.
std::string cmakefileName = std::string cmakefileName =
this->GetCMakeInstance()->GetHomeOutputDirectory(); this->GetCMakeInstance()->GetHomeOutputDirectory();
cmakefileName += "/CMakeFiles"; cmakefileName += "/CMakeFiles/Makefile.cmake";
cmakefileName += "/Makefile.cmake";
cmGeneratedFileStream cmakefileStream(cmakefileName); cmGeneratedFileStream cmakefileStream(cmakefileName);
if (!cmakefileStream) { if (!cmakefileStream) {
return; return;
...@@ -320,8 +316,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -320,8 +316,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// Build the path to the cache check file. // Build the path to the cache check file.
std::string check = this->GetCMakeInstance()->GetHomeOutputDirectory(); std::string check = this->GetCMakeInstance()->GetHomeOutputDirectory();
check += "/CMakeFiles"; check += "/CMakeFiles/cmake.check_cache";
check += "/cmake.check_cache";
// Set the corresponding makefile in the cmake file. // Set the corresponding makefile in the cmake file.
cmakefileStream << "# The corresponding makefile is:\n" cmakefileStream << "# The corresponding makefile is:\n"
...@@ -352,8 +347,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() ...@@ -352,8 +347,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
for (cmLocalGenerator* localGen : this->LocalGenerators) { for (cmLocalGenerator* localGen : this->LocalGenerators) {
lg = static_cast<cmLocalUnixMakefileGenerator3*>(localGen); lg = static_cast<cmLocalUnixMakefileGenerator3*>(localGen);
tmpStr = lg->GetCurrentBinaryDirectory(); tmpStr = lg->GetCurrentBinaryDirectory();
tmpStr += "/CMakeFiles"; tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake";
tmpStr += "/CMakeDirectoryInformation.cmake";
cmakefileStream << " \"" cmakefileStream << " \""
<< lg->MaybeConvertToRelativePath(binDir, tmpStr) << lg->MaybeConvertToRelativePath(binDir, tmpStr)
<< "\"\n"; << "\"\n";
......
...@@ -1038,8 +1038,7 @@ std::string cmGlobalVisualStudio10Generator::GenerateRuleFile( ...@@ -1038,8 +1038,7 @@ std::string cmGlobalVisualStudio10Generator::GenerateRuleFile(
// The VS 10 generator needs to create the .rule files on disk. // The VS 10 generator needs to create the .rule files on disk.
// Hide them away under the CMakeFiles directory. // Hide them away under the CMakeFiles directory.
std::string ruleDir = this->GetCMakeInstance()->GetHomeOutputDirectory(); std::string ruleDir = this->GetCMakeInstance()->GetHomeOutputDirectory();
ruleDir += "/CMakeFiles"; ruleDir += "/CMakeFiles/";
ruleDir += "/";
ruleDir += cmSystemTools::ComputeStringMD5( ruleDir += cmSystemTools::ComputeStringMD5(
cmSystemTools::GetFilenamePath(output).c_str()); cmSystemTools::GetFilenamePath(output).c_str());
std::string ruleFile = ruleDir + "/"; std::string ruleFile = ruleDir + "/";
......
...@@ -1399,8 +1399,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt) ...@@ -1399,8 +1399,7 @@ void cmGlobalXCodeGenerator::ForceLinkerLanguage(cmGeneratorTarget* gtgt)
// language. // language.
cmMakefile* mf = gtgt->Target->GetMakefile(); cmMakefile* mf = gtgt->Target->GetMakefile();
std::string fname = gtgt->GetLocalGenerator()->GetCurrentBinaryDirectory(); std::string fname = gtgt->GetLocalGenerator()->GetCurrentBinaryDirectory();
fname += "/CMakeFiles"; fname += "/CMakeFiles/";
fname += "/";
fname += gtgt->GetName(); fname += gtgt->GetName();
fname += "-CMakeForceLinker"; fname += "-CMakeForceLinker";
fname += "."; fname += ".";
...@@ -3701,8 +3700,7 @@ std::string cmGlobalXCodeGenerator::ComputeInfoPListLocation( ...@@ -3701,8 +3700,7 @@ std::string cmGlobalXCodeGenerator::ComputeInfoPListLocation(
cmGeneratorTarget* target) cmGeneratorTarget* target)
{ {
std::string plist = target->GetLocalGenerator()->GetCurrentBinaryDirectory(); std::string plist = target->GetLocalGenerator()->GetCurrentBinaryDirectory();
plist += "/CMakeFiles"; plist += "/CMakeFiles/";
plist += "/";
plist += target->GetName(); plist += target->GetName();
plist += ".dir/Info.plist"; plist += ".dir/Info.plist";
return plist; return plist;
......
...@@ -57,8 +57,7 @@ void cmInstallExportGenerator::ComputeTempDir() ...@@ -57,8 +57,7 @@ void cmInstallExportGenerator::ComputeTempDir()
// Choose a temporary directory in which to generate the import // Choose a temporary directory in which to generate the import
// files to be installed. // files to be installed.
this->TempDir = this->LocalGenerator->GetCurrentBinaryDirectory(); this->TempDir = this->LocalGenerator->GetCurrentBinaryDirectory();
this->TempDir += "/CMakeFiles"; this->TempDir += "/CMakeFiles/Export";
this->TempDir += "/Export";
if (this->Destination.empty()) { if (this->Destination.empty()) {
return; return;
} }
......
...@@ -88,8 +88,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig( ...@@ -88,8 +88,7 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(
if (this->Target->NeedRelinkBeforeInstall(config)) { if (this->Target->NeedRelinkBeforeInstall(config)) {
fromDirConfig = fromDirConfig =
this->Target->GetLocalGenerator()->GetCurrentBinaryDirectory(); this->Target->GetLocalGenerator()->GetCurrentBinaryDirectory();
fromDirConfig += "/CMakeFiles"; fromDirConfig += "/CMakeFiles/CMakeRelink.dir/";
fromDirConfig += "/CMakeRelink.dir/";
} else { } else {
cmStateEnums::ArtifactType artifact = this->ImportLibrary cmStateEnums::ArtifactType artifact = this->ImportLibrary
? cmStateEnums::ImportLibraryArtifact ? cmStateEnums::ImportLibraryArtifact
......
...@@ -428,8 +428,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets( ...@@ -428,8 +428,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalMakefileTargets(
void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile()
{ {
std::string infoFileName = this->GetCurrentBinaryDirectory(); std::string infoFileName = this->GetCurrentBinaryDirectory();
infoFileName += "/CMakeFiles"; infoFileName += "/CMakeFiles/CMakeDirectoryInformation.cmake";
infoFileName += "/CMakeDirectoryInformation.cmake";
// Open the output file. // Open the output file.
cmGeneratedFileStream infoFileStream(infoFileName); cmGeneratedFileStream infoFileStream(infoFileName);
...@@ -1345,8 +1344,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies( ...@@ -1345,8 +1344,7 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
bool needRescanDirInfo = false; bool needRescanDirInfo = false;
{ {
std::string dirInfoFile = this->GetCurrentBinaryDirectory(); std::string dirInfoFile = this->GetCurrentBinaryDirectory();
dirInfoFile += "/CMakeFiles"; dirInfoFile += "/CMakeFiles/CMakeDirectoryInformation.cmake";
dirInfoFile += "/CMakeDirectoryInformation.cmake";
int result; int result;
if (!ftc->Compare(internalDependFile, dirInfoFile, &result) || if (!ftc->Compare(internalDependFile, dirInfoFile, &result) ||
result < 0) { result < 0) {
...@@ -1411,8 +1409,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies( ...@@ -1411,8 +1409,7 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(
bool haveDirectoryInfo = false; bool haveDirectoryInfo = false;
{ {
std::string dirInfoFile = this->GetCurrentBinaryDirectory(); std::string dirInfoFile = this->GetCurrentBinaryDirectory();
dirInfoFile += "/CMakeFiles"; dirInfoFile += "/CMakeFiles/CMakeDirectoryInformation.cmake";
dirInfoFile += "/CMakeDirectoryInformation.cmake";
if (mf->ReadListFile(dirInfoFile) && if (mf->ReadListFile(dirInfoFile) &&
!cmSystemTools::GetErrorOccuredFlag()) { !cmSystemTools::GetErrorOccuredFlag()) {
haveDirectoryInfo = true; haveDirectoryInfo = true;
...@@ -1641,8 +1638,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( ...@@ -1641,8 +1638,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
progCmd << this->ConvertToOutputFormat( progCmd << this->ConvertToOutputFormat(
cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL); cmSystemTools::CollapseFullPath(progressDir), cmOutputConverter::SHELL);
std::string progressFile = "/CMakeFiles"; std::string progressFile = "/CMakeFiles/progress.marks";
progressFile += "/progress.marks";
std::string progressFileNameFull = this->ConvertToFullPath(progressFile); std::string progressFileNameFull = this->ConvertToFullPath(progressFile);
progCmd << " " progCmd << " "
<< this->ConvertToOutputFormat( << this->ConvertToOutputFormat(
...@@ -1650,8 +1646,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( ...@@ -1650,8 +1646,7 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules(
cmOutputConverter::SHELL); cmOutputConverter::SHELL);
commands.push_back(progCmd.str()); commands.push_back(progCmd.str());
} }
std::string mf2Dir = "CMakeFiles/"; std::string mf2Dir = "CMakeFiles/Makefile2";
mf2Dir += "Makefile2";
commands.push_back(this->GetRecursiveMakeCall(mf2Dir, recursiveTarget)); commands.push_back(this->GetRecursiveMakeCall(mf2Dir, recursiveTarget));
this->CreateCDCommand(commands, this->GetBinaryDirectory(), this->CreateCDCommand(commands, this->GetBinaryDirectory(),
this->GetCurrentBinaryDirectory()); this->GetCurrentBinaryDirectory());
......
...@@ -98,8 +98,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets() ...@@ -98,8 +98,7 @@ void cmLocalVisualStudio7Generator::FixGlobalTargets()
force_commands.push_back(force_command); force_commands.push_back(force_command);
std::string no_main_dependency; std::string no_main_dependency;
std::string force = this->GetCurrentBinaryDirectory(); std::string force = this->GetCurrentBinaryDirectory();
force += "/CMakeFiles"; force += "/CMakeFiles/";
force += "/";
force += l->GetName(); force += l->GetName();
force += "_force"; force += "_force";
if (cmSourceFile* file = this->Makefile->AddCustomCommandToOutput( if (cmSourceFile* file = this->Makefile->AddCustomCommandToOutput(
...@@ -147,8 +146,7 @@ void cmLocalVisualStudio7Generator::WriteStampFiles() ...@@ -147,8 +146,7 @@ void cmLocalVisualStudio7Generator::WriteStampFiles()
std::string stampName = this->GetCurrentBinaryDirectory(); std::string stampName = this->GetCurrentBinaryDirectory();
stampName += "/CMakeFiles"; stampName += "/CMakeFiles";
cmSystemTools::MakeDirectory(stampName.c_str()); cmSystemTools::MakeDirectory(stampName.c_str());
stampName += "/"; stampName += "/generate.stamp";
stampName += "generate.stamp";
cmsys::ofstream stamp(stampName.c_str()); cmsys::ofstream stamp(stampName.c_str());
stamp << "# CMake generation timestamp file for this directory.\n"; stamp << "# CMake generation timestamp file for this directory.\n";
......
...@@ -1182,8 +1182,7 @@ cmTarget* cmMakefile::AddUtilityCommand( ...@@ -1182,8 +1182,7 @@ cmTarget* cmMakefile::AddUtilityCommand(
// Store the custom command in the target. // Store the custom command in the target.
if (!commandLines.empty() || !depends.empty()) { if (!commandLines.empty() || !depends.empty()) {
std::string force = this->GetCurrentBinaryDirectory(); std::string force = this->GetCurrentBinaryDirectory();
force += "/CMakeFiles"; force += "/CMakeFiles/";
force += "/";
force += utilityName; force += utilityName;
std::vector<std::string> forced; std::vector<std::string> forced;
forced.push_back(force); forced.push_back(force);
......
...@@ -297,14 +297,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ...@@ -297,14 +297,13 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
if (this->GeneratorTarget->IsAppBundleOnApple()) { if (this->GeneratorTarget->IsAppBundleOnApple()) {
this->OSXBundleGenerator->CreateAppBundle(targetNames.Output, outpath); this->OSXBundleGenerator->CreateAppBundle(targetNames.Output, outpath);
} }
outpath += "/"; outpath += '/';
std::string outpathImp; std::string outpathImp;
if (relink) { if (relink) {
outpath = this->Makefile->GetCurrentBinaryDirectory(); outpath = this->Makefile->GetCurrentBinaryDirectory();
outpath += "/CMakeFiles"; outpath += "/CMakeFiles/CMakeRelink.dir";
outpath += "/CMakeRelink.dir";
cmSystemTools::MakeDirectory(outpath); cmSystemTools::MakeDirectory(outpath);
outpath += "/"; outpath += '/';
if (!targetNames.ImportLibrary.empty()) { if (!targetNames.ImportLibrary.empty()) {
outpathImp = outpath; outpathImp = outpath;
} }
...@@ -314,7 +313,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ...@@ -314,7 +313,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
outpathImp = this->GeneratorTarget->GetDirectory( outpathImp = this->GeneratorTarget->GetDirectory(
this->ConfigName, cmStateEnums::ImportLibraryArtifact); this->ConfigName, cmStateEnums::ImportLibraryArtifact);
cmSystemTools::MakeDirectory(outpathImp); cmSystemTools::MakeDirectory(outpathImp);
outpathImp += "/"; outpathImp += '/';
} }
} }
...@@ -325,7 +324,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) ...@@ -325,7 +324,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
std::string pdbOutputPath = std::string pdbOutputPath =
this->GeneratorTarget->GetPDBDirectory(this->ConfigName); this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(pdbOutputPath); cmSystemTools::MakeDirectory(pdbOutputPath);
pdbOutputPath += "/"; pdbOutputPath += '/';
std::string targetFullPath = outpath + targetNames.Output; std::string targetFullPath = outpath + targetNames.Output;
std::string targetFullPathReal = outpath + targetNames.Real; std::string targetFullPathReal = outpath + targetNames.Real;
......
...@@ -465,30 +465,29 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules( ...@@ -465,30 +465,29 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
outpath = this->GeneratorTarget->GetDirectory(this->ConfigName); outpath = this->GeneratorTarget->GetDirectory(this->ConfigName);
this->OSXBundleGenerator->CreateFramework(this->TargetNames.Output, this->OSXBundleGenerator->CreateFramework(this->TargetNames.Output,
outpath); outpath);
outpath += "/"; outpath += '/';
} else if (this->GeneratorTarget->IsCFBundleOnApple()) { } else if (this->GeneratorTarget->IsCFBundleOnApple()) {
outpath = this->GeneratorTarget->GetDirectory(this->ConfigName); outpath = this->GeneratorTarget->GetDirectory(this->ConfigName);
this->OSXBundleGenerator->CreateCFBundle(this->TargetNames.Output, this->OSXBundleGenerator->CreateCFBundle(this->TargetNames.Output,
outpath); outpath);
outpath += "/"; outpath += '/';
} else if (relink) { } else if (relink) {
outpath = this->Makefile->GetCurrentBinaryDirectory(); outpath = this->Makefile->GetCurrentBinaryDirectory();
outpath += "/CMakeFiles"; outpath += "/CMakeFiles/CMakeRelink.dir";
outpath += "/CMakeRelink.dir";
cmSystemTools::MakeDirectory(outpath); cmSystemTools::MakeDirectory(outpath);
outpath += "/"; outpath += '/';
if (!this->TargetNames.ImportLibrary.empty()) { if (!this->TargetNames.ImportLibrary.empty()) {
outpathImp = outpath; outpathImp = outpath;
} }
} else { } else {
outpath = this->GeneratorTarget->GetDirectory(this->ConfigName); outpath = this->GeneratorTarget->GetDirectory(this->ConfigName);
cmSystemTools::MakeDirectory(outpath); cmSystemTools::MakeDirectory(outpath);
outpath += "/"; outpath += '/';
if (!this->TargetNames.ImportLibrary.empty()) { if (!this->TargetNames.ImportLibrary.empty()) {
outpathImp = this->GeneratorTarget->GetDirectory( outpathImp = this->GeneratorTarget->GetDirectory(
this->ConfigName, cmStateEnums::ImportLibraryArtifact); this->ConfigName, cmStateEnums::ImportLibraryArtifact);
cmSystemTools::MakeDirectory(outpathImp); cmSystemTools::MakeDirectory(outpathImp);
outpathImp += "/"; outpathImp += '/';
} }
} }
......
...@@ -37,8 +37,7 @@ void cmNinjaUtilityTargetGenerator::Generate() ...@@ -37,8 +37,7 @@ void cmNinjaUtilityTargetGenerator::Generate()
cmGeneratorTarget* genTarget = this->GetGeneratorTarget(); cmGeneratorTarget* genTarget = this->GetGeneratorTarget();
std::string utilCommandName = lg->GetCurrentBinaryDirectory(); std::string utilCommandName = lg->GetCurrentBinaryDirectory();
utilCommandName += "/CMakeFiles"; utilCommandName += "/CMakeFiles/";
utilCommandName += "/";
utilCommandName += this->GetTargetName() + ".util"; utilCommandName += this->GetTargetName() + ".util";
utilCommandName = this->ConvertToNinjaPath(utilCommandName); utilCommandName = this->ConvertToNinjaPath(utilCommandName);
......
...@@ -294,11 +294,9 @@ bool cmQtAutoGenInitializer::InitCustomTargets() ...@@ -294,11 +294,9 @@ bool cmQtAutoGenInitializer::InitCustomTargets()
// Info directory // Info directory
this->Dir.Info = cbd; this->Dir.Info = cbd;
this->Dir.Info += "/CMakeFiles"; this->Dir.Info += "/CMakeFiles/";
this->Dir.Info += '/';
this->Dir.Info += this->Target->GetName(); this->Dir.Info += this->Target->GetName();
this->Dir.Info += "_autogen"; this->Dir.Info += "_autogen.dir";
this->Dir.Info += ".dir";
cmSystemTools::ConvertToUnixSlashes(this->Dir.Info); cmSystemTools::ConvertToUnixSlashes(this->Dir.Info);
// Build directory // Build directory
......
...@@ -215,8 +215,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs, ...@@ -215,8 +215,7 @@ void cmTryRunCommand::DoNotRunExecutable(const std::string& runArgs,
// removed at the end of TRY_RUN and the user can run it manually // removed at the end of TRY_RUN and the user can run it manually
// on the target platform. // on the target platform.
std::string copyDest = this->Makefile->GetHomeOutputDirectory(); std::string copyDest = this->Makefile->GetHomeOutputDirectory();
copyDest += "/CMakeFiles"; copyDest += "/CMakeFiles/";
copyDest += "/";
copyDest += cmSystemTools::GetFilenameWithoutExtension(this->OutputFile); copyDest += cmSystemTools::GetFilenameWithoutExtension(this->OutputFile);
copyDest += "-"; copyDest += "-";
copyDest += this->RunResultVariable; copyDest += this->RunResultVariable;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment