summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-14 12:37:18 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-05-14 12:37:24 (GMT)
commit21da0f83a21794bdd283210608ca7c127db084ec (patch)
treef57e496e36679d3154bb781de587f843c7ea097e /Source/cmVisualStudio10TargetGenerator.cxx
parent40a7572e4fc6dcd467130b1fa75f4960ba7c15d6 (diff)
parentf6d4fa63f84a88dbc59020b10fbdb7fb02fa1f9d (diff)
downloadCMake-21da0f83a21794bdd283210608ca7c127db084ec.zip
CMake-21da0f83a21794bdd283210608ca7c127db084ec.tar.gz
CMake-21da0f83a21794bdd283210608ca7c127db084ec.tar.bz2
Merge topic 'relative-paths'
f6d4fa63f8 cmStateDirectory: Comment relative path top directory selection approach f0ffb1e2d4 cmGlobalGenerator: Simplify relative path conversion in AddRuleHash d346805e41 cmLocalCommonGenerator: Select work directory semantically 15fa320071 cmLocalGenerator: Factor out relative path conversion helpers 1879f1bcbc cmLocalCommonGenerator: Factor out relative path conversion helper 1d1d88d3c8 cmMakefileTargetGenerator: Clarify name of relative path conversion helper ec1ea13066 cmDependsFortran: Simplify relative path conversion helper ba7b939831 cmStateDirectory: Rename ConvertToRelPathIf{Not => }Contained ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6122
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx18
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index ad98ba5..1c8b672 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3356,8 +3356,6 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
// cmLinkLineDeviceComputer
cmComputeLinkInformation& cli = *pcli;
std::vector<std::string> libVec;
- const std::string currentBinDir =
- this->LocalGenerator->GetCurrentBinaryDirectory();
const auto& libs = cli.GetItems();
for (cmComputeLinkInformation::Item const& l : libs) {
@@ -3394,8 +3392,8 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
}
if (l.IsPath) {
- std::string path = this->LocalGenerator->MaybeConvertToRelativePath(
- currentBinDir, l.Value.Value);
+ std::string path =
+ this->LocalGenerator->MaybeRelativeToCurBinDir(l.Value.Value);
ConvertToWindowsSlash(path);
if (!cmVS10IsTargetsFile(l.Value.Value)) {
libVec.push_back(path);
@@ -3946,12 +3944,10 @@ bool cmVisualStudio10TargetGenerator::ComputeLibOptions(
cmComputeLinkInformation& cli = *pcli;
using ItemVector = cmComputeLinkInformation::ItemVector;
const ItemVector& libs = cli.GetItems();
- std::string currentBinDir =
- this->LocalGenerator->GetCurrentBinaryDirectory();
for (cmComputeLinkInformation::Item const& l : libs) {
if (l.IsPath && cmVS10IsTargetsFile(l.Value.Value)) {
- std::string path = this->LocalGenerator->MaybeConvertToRelativePath(
- currentBinDir, l.Value.Value);
+ std::string path =
+ this->LocalGenerator->MaybeRelativeToCurBinDir(l.Value.Value);
ConvertToWindowsSlash(path);
this->AddTargetsFileAndConfigPair(path, config);
}
@@ -3991,8 +3987,6 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
{
using ItemVector = cmComputeLinkInformation::ItemVector;
ItemVector const& libs = cli.GetItems();
- std::string currentBinDir =
- this->LocalGenerator->GetCurrentBinaryDirectory();
for (cmComputeLinkInformation::Item const& l : libs) {
if (l.Target) {
auto managedType = l.Target->GetManagedType(config);
@@ -4035,8 +4029,8 @@ void cmVisualStudio10TargetGenerator::AddLibraries(
}
if (l.IsPath) {
- std::string path = this->LocalGenerator->MaybeConvertToRelativePath(
- currentBinDir, l.Value.Value);
+ std::string path =
+ this->LocalGenerator->MaybeRelativeToCurBinDir(l.Value.Value);
ConvertToWindowsSlash(path);
if (cmVS10IsTargetsFile(l.Value.Value)) {
vsTargetVec.push_back(path);