diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-11-23 11:14:17 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-11-28 15:02:58 (GMT) |
commit | afd0f6785dc1220a07743d31699fcd9097cca46a (patch) | |
tree | 3e0f199890677e0a1157ba88421052d946b3bed7 /Source/cmMakefileTargetGenerator.cxx | |
parent | b6068ce407e541b13fc0484bc6b84e896c9913e8 (diff) | |
download | CMake-afd0f6785dc1220a07743d31699fcd9097cca46a.zip CMake-afd0f6785dc1220a07743d31699fcd9097cca46a.tar.gz CMake-afd0f6785dc1220a07743d31699fcd9097cca46a.tar.bz2 |
Refactoring: Abstract Makefile line continuation format
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index d656669..6bc915d 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1544,12 +1544,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( << this->GeneratorTarget->GetName() << "\n" << variableName << " ="; std::string object; - std::string lineContinue; - if (cmProp p = this->Makefile->GetDefinition("CMAKE_MAKE_LINE_CONTINUE")) { - lineContinue = *p; - } else { - lineContinue = "\\"; - } + const auto& lineContinue = this->GlobalGenerator->LineContinueDirective; cmProp pchExtension = this->Makefile->GetDefinition("CMAKE_PCH_EXTENSION"); @@ -1557,7 +1552,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( if (cmSystemTools::StringEndsWith(obj, cmToCStr(pchExtension))) { continue; } - *this->BuildFileStream << " " << lineContinue << "\n"; + *this->BuildFileStream << " " << lineContinue; *this->BuildFileStream << cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath( obj, useWatcomQuote); @@ -1580,7 +1575,7 @@ void cmMakefileTargetGenerator::WriteObjectsVariable( for (std::string const& obj : this->ExternalObjects) { object = this->LocalGenerator->MaybeConvertToRelativePath(currentBinDir, obj); - *this->BuildFileStream << " " << lineContinue << "\n"; + *this->BuildFileStream << " " << lineContinue; *this->BuildFileStream << cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath( obj, useWatcomQuote); |