summaryrefslogtreecommitdiffstats
path: root/Source/cmGhsMultiTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.cxx')
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx54
1 files changed, 27 insertions, 27 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 6470ea1..deb722f 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -165,13 +165,15 @@ void cmGhsMultiTargetGenerator::WriteTargetSpecifics(std::ostream& fout,
outpath = this->GeneratorTarget->GetDirectory(config);
outpath =
this->LocalGenerator->MaybeConvertToRelativePath(rootpath, outpath);
- fout << " :binDirRelative=\"" << outpath << "\"" << std::endl;
- fout << " -o \"" << this->TargetNameReal << "\"" << std::endl;
+ /* clang-format off */
+ fout << " :binDirRelative=\"" << outpath << "\"\n"
+ " -o \"" << this->TargetNameReal << "\"\n";
+ /* clang-format on */
}
// set target object file destination
outpath = this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
- fout << " :outputDirRelative=\"" << outpath << "\"" << std::endl;
+ fout << " :outputDirRelative=\"" << outpath << "\"\n";
}
void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config,
@@ -232,7 +234,7 @@ void cmGhsMultiTargetGenerator::WriteCompilerFlags(std::ostream& fout,
std::vector<std::string> ghsCompFlags =
cmSystemTools::ParseArguments(flagsByLangI->second);
for (const std::string& f : ghsCompFlags) {
- fout << " " << f << std::endl;
+ fout << " " << f << '\n';
}
}
}
@@ -245,7 +247,7 @@ void cmGhsMultiTargetGenerator::WriteCompilerDefinitions(
this->GeneratorTarget->GetCompileDefinitions(compileDefinitions, config,
language);
for (std::string const& compileDefinition : compileDefinitions) {
- fout << " -D" << compileDefinition << std::endl;
+ fout << " -D" << compileDefinition << '\n';
}
}
@@ -258,7 +260,7 @@ void cmGhsMultiTargetGenerator::WriteIncludes(std::ostream& fout,
language, config);
for (std::string const& include : includes) {
- fout << " -I\"" << include << "\"" << std::endl;
+ fout << " -I\"" << include << "\"\n";
}
}
@@ -287,14 +289,14 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout,
// write out link options
std::vector<std::string> lopts = cmSystemTools::ParseArguments(linkFlags);
for (const std::string& l : lopts) {
- fout << " " << l << std::endl;
+ fout << " " << l << '\n';
}
// write out link search paths
// must be quoted for paths that contain spaces
std::vector<std::string> lpath = cmSystemTools::ParseArguments(linkPath);
for (const std::string& l : lpath) {
- fout << " -L\"" << l << "\"" << std::endl;
+ fout << " -L\"" << l << "\"\n";
}
// write out link libs
@@ -305,10 +307,10 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout,
cmSystemTools::ParseArguments(linkLibraries);
for (const std::string& l : llibs) {
if (l.compare(0, 2, "-l") == 0) {
- fout << " \"" << l << "\"" << std::endl;
+ fout << " \"" << l << "\"\n";
} else {
std::string rl = cmSystemTools::CollapseFullPath(l, cbd);
- fout << " -l\"" << rl << "\"" << std::endl;
+ fout << " -l\"" << rl << "\"\n";
}
}
}
@@ -349,13 +351,12 @@ void cmGhsMultiTargetGenerator::WriteBuildEventsHelper(
this->WriteCustomCommandsHelper(f, ccg);
f.Close();
if (this->TagType != GhsMultiGpj::CUSTOM_TARGET) {
- fout << " :" << cmd << "=\"" << fname << "\"" << std::endl;
+ fout << " :" << cmd << "=\"" << fname << "\"\n";
} else {
- fout << fname << std::endl;
- fout << " :outputName=\"" << fname << ".rule\"" << std::endl;
+ fout << fname << "\n :outputName=\"" << fname << ".rule\"\n";
}
for (auto& byp : ccg.GetByproducts()) {
- fout << " :extraOutputFile=\"" << byp << "\"" << std::endl;
+ fout << " :extraOutputFile=\"" << byp << "\"\n";
}
}
}
@@ -447,8 +448,7 @@ void cmGhsMultiTargetGenerator::WriteCustomCommandsHelper(
// push back the custom commands
for (auto const& c : cmdLines) {
- fout << c << std::endl;
- fout << check_error << std::endl;
+ fout << c << '\n' << check_error << '\n';
}
}
@@ -460,7 +460,7 @@ void cmGhsMultiTargetGenerator::WriteSourceProperty(
if (prop) {
std::vector<std::string> list = cmExpandedList(prop);
for (const std::string& p : list) {
- fout << " " << propFlag << p << std::endl;
+ fout << " " << propFlag << p << '\n';
}
}
}
@@ -575,12 +575,12 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
if (useProjectFile) {
if (sg.empty()) {
- *fout << "{comment} Others" << std::endl;
+ *fout << "{comment} Others" << '\n';
} else {
- *fout << "{comment} " << sg << std::endl;
+ *fout << "{comment} " << sg << '\n';
}
} else if (sg.empty()) {
- *fout << "{comment} Others" << std::endl;
+ *fout << "{comment} Others\n";
}
if (sg != "CMake Rules") {
@@ -608,7 +608,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
compile = false;
}
- *fout << comment << fname << std::endl;
+ *fout << comment << fname << '\n';
if (compile) {
if ("ld" != si->GetExtension() && "int" != si->GetExtension() &&
"bsp" != si->GetExtension()) {
@@ -624,7 +624,7 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
std::string objectName = this->GeneratorTarget->GetObjectName(si);
if (!objectName.empty() &&
this->GeneratorTarget->HasExplicitObjectName(si)) {
- *fout << " -o " << objectName << std::endl;
+ *fout << " -o " << objectName << '\n';
}
}
}
@@ -691,14 +691,14 @@ void cmGhsMultiTargetGenerator::WriteCustomCommandLine(
*/
bool specifyExtra = true;
for (auto& out : ccg.GetOutputs()) {
- fout << fname << std::endl;
- fout << " :outputName=\"" << out << "\"" << std::endl;
+ fout << fname << '\n';
+ fout << " :outputName=\"" << out << "\"\n";
if (specifyExtra) {
for (auto& byp : ccg.GetByproducts()) {
- fout << " :extraOutputFile=\"" << byp << "\"" << std::endl;
+ fout << " :extraOutputFile=\"" << byp << "\"\n";
}
for (auto& dep : ccg.GetDepends()) {
- fout << " :depends=\"" << dep << "\"" << std::endl;
+ fout << " :depends=\"" << dep << "\"\n";
}
specifyExtra = false;
}
@@ -713,7 +713,7 @@ void cmGhsMultiTargetGenerator::WriteObjectLangOverride(
std::string sourceLangProp(rawLangProp);
std::string const& extension = sourceFile->GetExtension();
if ("CXX" == sourceLangProp && ("c" == extension || "C" == extension)) {
- fout << " -dotciscxx" << std::endl;
+ fout << " -dotciscxx\n";
}
}
}