summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a7799b6..e7cc189 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -877,7 +877,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
if ((sep[0] != ' ') && !flags.empty() && flags.back() == sep[0]) {
flags.back() = ' ';
}
- return flags;
+ return cmTrimWhitespace(flags);
}
void cmLocalGenerator::AddCompileOptions(std::string& flags,
@@ -1390,8 +1390,8 @@ void cmLocalGenerator::GetTargetFlags(
for (cmSourceFile* sf : sources) {
if (sf->GetExtension() == "def") {
sharedLibFlags += defFlag;
- sharedLibFlags += this->ConvertToOutputFormat(
- cmSystemTools::CollapseFullPath(sf->ResolveFullPath()), SHELL);
+ sharedLibFlags +=
+ this->ConvertToOutputFormat(sf->ResolveFullPath(), SHELL);
sharedLibFlags += " ";
}
}
@@ -2396,7 +2396,9 @@ void cmLocalGenerator::AddConfigVariableFlags(std::string& flags,
void cmLocalGenerator::AppendFlags(std::string& flags,
const std::string& newFlags) const
{
- if (!newFlags.empty()) {
+ bool allSpaces = std::all_of(newFlags.begin(), newFlags.end(), cmIsSpace);
+
+ if (!newFlags.empty() && !allSpaces) {
if (!flags.empty()) {
flags += " ";
}