summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2020-03-11 20:25:34 -0700
committerBrad King <brad.king@kitware.com>2020-03-12 08:46:11 -0400
commitaf39d1b99354e11d9415725f4338af065c79eb87 (patch)
tree3c490aa72b4ba76cb720535df681c7c0ec08c3b6
parentb7d8c91822101ff9de07075e9b1f02e18c2725da (diff)
downloadcmake-af39d1b99354e11d9415725f4338af065c79eb87.tar.gz
Swift: Fix quoting of library search paths with spaces
The library search paths added by commit 2746c61e6d (Swift: Add library search paths for dependencies, 2019-06-09, v3.16.0-rc1~561^2) need to be quoted properly on command lines to handle spaces and such. This was already done by `cmLinkLineComputer::ComputeLinkPath` for non-Swift-specific link directories.
-rw-r--r--Source/cmLinkLineComputer.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index 3d516f8033..3fc41cf78d 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -142,9 +142,11 @@ void cmLinkLineComputer::ComputeLinkPath(
type = cmStateEnums::ImportLibraryArtifact;
}
- linkPathNoBT += cmStrCat(
- " ", libPathFlag, item.Target->GetDirectory(cli.GetConfig(), type),
- libPathTerminator, " ");
+ linkPathNoBT +=
+ cmStrCat(" ", libPathFlag,
+ this->ConvertToOutputForExisting(
+ item.Target->GetDirectory(cli.GetConfig(), type)),
+ libPathTerminator, " ");
}
}