diff options
author | Brad King <brad.king@kitware.com> | 2020-02-10 18:34:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-02-10 21:11:38 (GMT) |
commit | e75632843480aefc303303b85350ecddcc57cc5e (patch) | |
tree | e7927962f08b2817b93a6bb945a8238acd0bdfef /Source | |
parent | 44b8937b7614560d9e88d25456c8394b4b209d51 (diff) | |
download | CMake-e75632843480aefc303303b85350ecddcc57cc5e.zip CMake-e75632843480aefc303303b85350ecddcc57cc5e.tar.gz CMake-e75632843480aefc303303b85350ecddcc57cc5e.tar.bz2 |
Propagate backtraces from LINK_LIBRARIES through to link line items
Since commit d4d0dd0f6a (cmLinkLineComputer: Add ComputeLinkLibs
overload with backtraces, 2019-09-13, v3.16.0-rc1~87^2~4), backtraces
have been collected by `ComputeLinkLibs` by looking back through the
link implementation libraries for one matching the text of the link line
item. This is slow in projects with long link lines.
Instead, teach `cmComputeLinkDepends` and `cmComputeLinkInformation` to
carry backtrace information explicitly along with the text of each item.
Fixes: #20322
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 17 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.h | 3 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 82 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.h | 20 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmLinkLineComputer.cxx | 22 | ||||
-rw-r--r-- | Source/cmLinkLineDeviceComputer.cxx | 10 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 4 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 16 |
9 files changed, 85 insertions, 93 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 7a9e2b7..ccef9c8 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -301,11 +301,11 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item) // Initialize the item entry. int index = lei->second; LinkEntry& entry = this->EntryList[index]; - entry.Item = item.AsStr(); + entry.Item = BT<std::string>(item.AsStr(), item.Backtrace); entry.Target = item.Target; - entry.IsFlag = - (!entry.Target && entry.Item[0] == '-' && entry.Item[1] != 'l' && - entry.Item.substr(0, 10) != "-framework"); + entry.IsFlag = (!entry.Target && entry.Item.Value[0] == '-' && + entry.Item.Value[1] != 'l' && + entry.Item.Value.substr(0, 10) != "-framework"); // If the item has dependencies queue it to follow them. if (entry.Target) { @@ -314,7 +314,7 @@ int cmComputeLinkDepends::AddLinkEntry(cmLinkItem const& item) this->BFSQueue.push(qe); } else { // Look for an old-style <item>_LIB_DEPENDS variable. - std::string var = cmStrCat(entry.Item, "_LIB_DEPENDS"); + std::string var = cmStrCat(entry.Item.Value, "_LIB_DEPENDS"); if (const char* val = this->Makefile->GetDefinition(var)) { // The item dependencies are known. Follow them. BFSEntry qe = { index, val }; @@ -396,7 +396,7 @@ void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) // Initialize the item entry. LinkEntry& entry = this->EntryList[lei->second]; - entry.Item = dep.Item.AsStr(); + entry.Item = BT<std::string>(dep.Item.AsStr(), dep.Item.Backtrace); entry.Target = dep.Item.Target; // This item was added specifically because it is a dependent @@ -671,7 +671,8 @@ void cmComputeLinkDepends::DisplayComponents() fprintf(stderr, "Component (%u):\n", c); NodeList const& nl = components[c]; for (int i : nl) { - fprintf(stderr, " item %d [%s]\n", i, this->EntryList[i].Item.c_str()); + fprintf(stderr, " item %d [%s]\n", i, + this->EntryList[i].Item.Value.c_str()); } EdgeList const& ol = this->CCG->GetComponentGraphEdges(c); for (cmGraphEdge const& oi : ol) { @@ -819,7 +820,7 @@ void cmComputeLinkDepends::DisplayFinalEntries() if (lei.Target) { fprintf(stderr, " target [%s]\n", lei.Target->GetName().c_str()); } else { - fprintf(stderr, " item [%s]\n", lei.Item.c_str()); + fprintf(stderr, " item [%s]\n", lei.Item.Value.c_str()); } } fprintf(stderr, "\n"); diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 645189a..43bfd1d 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -15,6 +15,7 @@ #include "cmGraphAdjacencyList.h" #include "cmLinkItem.h" +#include "cmListFileCache.h" #include "cmTargetLinkLibraryType.h" class cmComputeComponentGraph; @@ -39,7 +40,7 @@ public: // Basic information about each link item. struct LinkEntry { - std::string Item; + BT<std::string> Item; cmGeneratorTarget const* Target = nullptr; bool IsSharedDep = false; bool IsFlag = false; diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 8773d10..f3dd840 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -603,7 +603,7 @@ void cmComputeLinkInformation::AddImplicitLinkInfo(std::string const& lang) } } -void cmComputeLinkInformation::AddItem(std::string const& item, +void cmComputeLinkInformation::AddItem(BT<std::string> const& item, cmGeneratorTarget const* tgt) { // Compute the proper name to use to link this library. @@ -629,7 +629,8 @@ void cmComputeLinkInformation::AddItem(std::string const& item, std::string exe = tgt->GetFullPath(config, artifact, true); linkItem += exe; - this->Items.emplace_back(linkItem, true, tgt); + this->Items.emplace_back(BT<std::string>(linkItem, item.Backtrace), true, + tgt); this->Depends.push_back(std::move(exe)); } else if (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) { // Add the interface library as an item so it can be considered as part @@ -640,7 +641,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item, // Also add the item the interface specifies to be used in its place. std::string const& libName = tgt->GetImportedLibName(config); if (!libName.empty()) { - this->AddItem(libName, nullptr); + this->AddItem(BT<std::string>(libName, item.Backtrace), nullptr); } } else if (tgt->GetType() == cmStateEnums::OBJECT_LIBRARY) { // Ignore object library! @@ -652,8 +653,9 @@ void cmComputeLinkInformation::AddItem(std::string const& item, : cmStateEnums::RuntimeBinaryArtifact; // Pass the full path to the target file. - std::string lib = tgt->GetFullPath(config, artifact, true); - if (tgt->Target->IsAIX() && cmHasLiteralSuffix(lib, "-NOTFOUND") && + BT<std::string> lib = BT<std::string>( + tgt->GetFullPath(config, artifact, true), item.Backtrace); + if (tgt->Target->IsAIX() && cmHasLiteralSuffix(lib.Value, "-NOTFOUND") && artifact == cmStateEnums::ImportLibraryArtifact) { // This is an imported executable on AIX that has ENABLE_EXPORTS // but not IMPORTED_IMPLIB. CMake used to produce and accept such @@ -664,23 +666,23 @@ void cmComputeLinkInformation::AddItem(std::string const& item, } if (!this->LinkDependsNoShared || tgt->GetType() != cmStateEnums::SHARED_LIBRARY) { - this->Depends.push_back(lib); + this->Depends.push_back(lib.Value); } this->AddTargetItem(lib, tgt); - this->AddLibraryRuntimeInfo(lib, tgt); + this->AddLibraryRuntimeInfo(lib.Value, tgt); } } else { // This is not a CMake target. Use the name given. - if (cmSystemTools::FileIsFullPath(item)) { - if (cmSystemTools::FileIsDirectory(item)) { + if (cmSystemTools::FileIsFullPath(item.Value)) { + if (cmSystemTools::FileIsDirectory(item.Value)) { // This is a directory. - this->AddDirectoryItem(item); + this->AddDirectoryItem(item.Value); } else { // Use the full path given to the library file. - this->Depends.push_back(item); + this->Depends.push_back(item.Value); this->AddFullItem(item); - this->AddLibraryRuntimeInfo(item); + this->AddLibraryRuntimeInfo(item.Value); } } else { // This is a library or option specified by the user. @@ -689,7 +691,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item, } } -void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, +void cmComputeLinkInformation::AddSharedDepItem(BT<std::string> const& item, const cmGeneratorTarget* tgt) { // If dropping shared library dependencies, ignore them. @@ -708,12 +710,12 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, } else { // Skip items that are not full paths. We will not be able to // reliably specify them. - if (!cmSystemTools::FileIsFullPath(item)) { + if (!cmSystemTools::FileIsFullPath(item.Value)) { return; } // Get the name of the library from the file name. - std::string file = cmSystemTools::GetFilenameName(item); + std::string file = cmSystemTools::GetFilenameName(item.Value); if (!this->ExtractSharedLibraryName.find(file)) { // This is not the name of a shared library. return; @@ -737,7 +739,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, lib = tgt->GetFullPath(this->Config, artifact); this->AddLibraryRuntimeInfo(lib, tgt); } else { - lib = item; + lib = item.Value; this->AddLibraryRuntimeInfo(lib); } @@ -994,7 +996,7 @@ void cmComputeLinkInformation::SetCurrentLinkType(LinkType lt) } } -void cmComputeLinkInformation::AddTargetItem(std::string const& item, +void cmComputeLinkInformation::AddTargetItem(BT<std::string> const& item, cmGeneratorTarget const* target) { // This is called to handle a link item that is a full path to a target. @@ -1015,7 +1017,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, // Handle case of an imported shared library with no soname. if (this->NoSONameUsesPath && target->IsImportedSharedLibWithoutSOName(this->Config)) { - this->AddSharedLibNoSOName(item); + this->AddSharedLibNoSOName(item.Value); return; } @@ -1023,23 +1025,23 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, // the linker search path. if (this->OldLinkDirMode && !target->IsFrameworkOnApple() && !cmContains(this->OldLinkDirMask, - cmSystemTools::GetFilenamePath(item))) { - this->OldLinkDirItems.push_back(item); + cmSystemTools::GetFilenamePath(item.Value))) { + this->OldLinkDirItems.push_back(item.Value); } // Now add the full path to the library. this->Items.emplace_back(item, true, target); } -void cmComputeLinkInformation::AddFullItem(std::string const& item) +void cmComputeLinkInformation::AddFullItem(BT<std::string> const& item) { // Check for the implicit link directory special case. - if (this->CheckImplicitDirItem(item)) { + if (this->CheckImplicitDirItem(item.Value)) { return; } // Check for case of shared library with no builtin soname. - if (this->NoSONameUsesPath && this->CheckSharedLibNoSOName(item)) { + if (this->NoSONameUsesPath && this->CheckSharedLibNoSOName(item.Value)) { return; } @@ -1049,9 +1051,9 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item) if (this->Target->GetPolicyStatusCMP0008() != cmPolicies::NEW && (generator.find("Visual Studio") != std::string::npos || generator.find("Xcode") != std::string::npos)) { - std::string file = cmSystemTools::GetFilenameName(item); + std::string file = cmSystemTools::GetFilenameName(item.Value); if (!this->ExtractAnyLibraryName.find(file)) { - this->HandleBadFullItem(item, file); + this->HandleBadFullItem(item.Value, file); return; } } @@ -1063,10 +1065,10 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item) // static libraries. If a previous user item changed the link type // to static we need to make sure it is back to shared. if (this->LinkTypeEnabled) { - std::string name = cmSystemTools::GetFilenameName(item); + std::string name = cmSystemTools::GetFilenameName(item.Value); if (this->ExtractSharedLibraryName.find(name)) { this->SetCurrentLinkType(LinkShared); - } else if (!this->ExtractStaticLibraryName.find(item)) { + } else if (!this->ExtractStaticLibraryName.find(item.Value)) { // We cannot determine the type. Assume it is the target's // default type. this->SetCurrentLinkType(this->StartLinkType); @@ -1077,8 +1079,8 @@ void cmComputeLinkInformation::AddFullItem(std::string const& item) // the linker search path. if (this->OldLinkDirMode && !cmContains(this->OldLinkDirMask, - cmSystemTools::GetFilenamePath(item))) { - this->OldLinkDirItems.push_back(item); + cmSystemTools::GetFilenamePath(item.Value))) { + this->OldLinkDirItems.push_back(item.Value); } // Now add the full path to the library. @@ -1142,7 +1144,7 @@ bool cmComputeLinkInformation::CheckImplicitDirItem(std::string const& item) return true; } -void cmComputeLinkInformation::AddUserItem(std::string const& item, +void cmComputeLinkInformation::AddUserItem(BT<std::string> const& item, bool pathNotKnown) { // This is called to handle a link item that does not match a CMake @@ -1154,14 +1156,14 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item, // libfoo.a ==> -Wl,-Bstatic -lfoo // Pass flags through untouched. - if (item[0] == '-' || item[0] == '$' || item[0] == '`') { + if (item.Value[0] == '-' || item.Value[0] == '$' || item.Value[0] == '`') { // if this is a -l option then we might need to warn about // CMP0003 so put it in OldUserFlagItems, if it is not a -l // or -Wl,-l (-framework -pthread), then allow it without a // CMP0003 as -L will not affect those other linker flags - if (item.find("-l") == 0 || item.find("-Wl,-l") == 0) { + if (item.Value.find("-l") == 0 || item.Value.find("-Wl,-l") == 0) { // This is a linker option provided by the user. - this->OldUserFlagItems.push_back(item); + this->OldUserFlagItems.push_back(item.Value); } // Restore the target link type since this item does not specify @@ -1184,7 +1186,7 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item, // libraries. On AIX a library with the name libfoo.a can be // shared! std::string lib; - if (this->ExtractSharedLibraryName.find(item)) { + if (this->ExtractSharedLibraryName.find(item.Value)) { // This matches a shared library file name. #ifdef CM_COMPUTE_LINK_INFO_DEBUG fprintf(stderr, "shared regex matched [%s] [%s] [%s]\n", @@ -1197,7 +1199,7 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item, // Use just the library name so the linker will search. lib = this->ExtractSharedLibraryName.match(2); - } else if (this->ExtractStaticLibraryName.find(item)) { + } else if (this->ExtractStaticLibraryName.find(item.Value)) { // This matches a static library file name. #ifdef CM_COMPUTE_LINK_INFO_DEBUG fprintf(stderr, "static regex matched [%s] [%s] [%s]\n", @@ -1210,7 +1212,7 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item, // Use just the library name so the linker will search. lib = this->ExtractStaticLibraryName.match(2); - } else if (this->ExtractAnyLibraryName.find(item)) { + } else if (this->ExtractAnyLibraryName.find(item.Value)) { // This matches a library file name. #ifdef CM_COMPUTE_LINK_INFO_DEBUG fprintf(stderr, "any regex matched [%s] [%s] [%s]\n", @@ -1227,19 +1229,19 @@ void cmComputeLinkInformation::AddUserItem(std::string const& item, } else { // This is a name specified by the user. if (pathNotKnown) { - this->OldUserFlagItems.push_back(item); + this->OldUserFlagItems.push_back(item.Value); } // We must ask the linker to search for a library with this name. // Restore the target link type since this item does not specify // one. this->SetCurrentLinkType(this->StartLinkType); - lib = item; + lib = item.Value; } // Create an option to ask the linker to search for the library. std::string out = cmStrCat(this->LibLinkFlag, lib, this->LibLinkSuffix); - this->Items.emplace_back(out, false); + this->Items.emplace_back(BT<std::string>(out, item.Backtrace), false); // Here we could try to find the library the linker will find and // add a runtime information entry for it. It would probably not be @@ -1269,7 +1271,7 @@ void cmComputeLinkInformation::AddFrameworkItem(std::string const& item) this->AddLibraryRuntimeInfo(full_fw); // Add the item using the -framework option. - this->Items.emplace_back("-framework", false); + this->Items.emplace_back(std::string("-framework"), false); cmOutputConverter converter(this->Makefile->GetStateSnapshot()); fw = converter.EscapeForShell(fw); this->Items.emplace_back(fw, false); diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 92ab83b..ee74ccd 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -13,13 +13,13 @@ #include "cmsys/RegularExpression.hxx" +#include "cmListFileCache.h" + class cmGeneratorTarget; class cmGlobalGenerator; class cmMakefile; class cmOrderDirectories; class cmake; -template <typename T> -class BT; /** \class cmComputeLinkInformation * \brief Compute link information for a target in one configuration. @@ -35,13 +35,13 @@ public: struct Item { Item() = default; - Item(std::string v, bool p, cmGeneratorTarget const* target = nullptr) + Item(BT<std::string> v, bool p, cmGeneratorTarget const* target = nullptr) : Value(std::move(v)) , IsPath(p) , Target(target) { } - std::string Value; + BT<std::string> Value; bool IsPath = true; cmGeneratorTarget const* Target = nullptr; }; @@ -74,8 +74,9 @@ public: const cmGeneratorTarget* GetTarget() { return this->Target; } private: - void AddItem(std::string const& item, const cmGeneratorTarget* tgt); - void AddSharedDepItem(std::string const& item, cmGeneratorTarget const* tgt); + void AddItem(BT<std::string> const& item, const cmGeneratorTarget* tgt); + void AddSharedDepItem(BT<std::string> const& item, + cmGeneratorTarget const* tgt); // Output information. ItemVector Items; @@ -146,10 +147,11 @@ private: std::string NoCaseExpression(const char* str); // Handling of link items. - void AddTargetItem(std::string const& item, const cmGeneratorTarget* target); - void AddFullItem(std::string const& item); + void AddTargetItem(BT<std::string> const& item, + const cmGeneratorTarget* target); + void AddFullItem(BT<std::string> const& item); bool CheckImplicitDirItem(std::string const& item); - void AddUserItem(std::string const& item, bool pathNotKnown); + void AddUserItem(BT<std::string> const& item, bool pathNotKnown); void AddDirectoryItem(std::string const& item); void AddFrameworkItem(std::string const& item); void DropDirectoryItem(std::string const& item); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 3002b2a..aee475b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2812,11 +2812,11 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target) linkLibs += sep; sep = " "; if (libName.IsPath) { - linkLibs += this->XCodeEscapePath(libName.Value); + linkLibs += this->XCodeEscapePath(libName.Value.Value); } else if (!libName.Target || libName.Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { - linkLibs += libName.Value; + linkLibs += libName.Value.Value; } if (libName.Target && !libName.Target->IsImported()) { target->AddDependTarget(configName, libName.Target->GetName()); diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index 0dc6236..3d516f8 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -9,7 +9,6 @@ #include "cmComputeLinkInformation.h" #include "cmGeneratorTarget.h" -#include "cmLinkItem.h" #include "cmListFileCache.h" #include "cmOutputConverter.h" #include "cmStateDirectory.h" @@ -79,27 +78,14 @@ void cmLinkLineComputer::ComputeLinkLibs( BT<std::string> linkLib; if (item.IsPath) { linkLib.Value += cli.GetLibLinkFileFlag(); - linkLib.Value += - this->ConvertToOutputFormat(this->ConvertToLinkReference(item.Value)); + linkLib.Value += this->ConvertToOutputFormat( + this->ConvertToLinkReference(item.Value.Value)); + linkLib.Backtrace = item.Value.Backtrace; } else { - linkLib.Value += item.Value; + linkLib = item.Value; } linkLib.Value += " "; - const cmLinkImplementation* linkImpl = - cli.GetTarget()->GetLinkImplementation(cli.GetConfig()); - - for (const cmLinkImplItem& iter : linkImpl->Libraries) { - if (iter.Target != nullptr && - iter.Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { - std::string libPath = iter.Target->GetLocation(cli.GetConfig()); - if (item.Value == libPath) { - linkLib.Backtrace = iter.Backtrace; - break; - } - } - } - linkLibraries.emplace_back(linkLib); } } diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index 847334b..65ed34c 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -115,18 +115,18 @@ void cmLinkLineDeviceComputer::ComputeLinkLibraries( // These should be passed to nvlink. Other extensions need to be left // out because nvlink may not understand or need them. Even though it // can tolerate '.so' or '.dylib' it cannot tolerate '.so.1'. - if (cmHasLiteralSuffix(item.Value, ".a") || - cmHasLiteralSuffix(item.Value, ".lib")) { + if (cmHasLiteralSuffix(item.Value.Value, ".a") || + cmHasLiteralSuffix(item.Value.Value, ".lib")) { linkLib.Value += this->ConvertToOutputFormat( - this->ConvertToLinkReference(item.Value)); + this->ConvertToLinkReference(item.Value.Value)); } } else if (item.Value == "-framework") { // This is the first part of '-framework Name' where the framework // name is specified as a following item. Ignore both. skipItemAfterFramework = true; continue; - } else if (cmLinkItemValidForDevice(item.Value)) { - linkLib.Value += item.Value; + } else if (cmLinkItemValidForDevice(item.Value.Value)) { + linkLib.Value += item.Value.Value; } if (emitted.insert(linkLib.Value).second) { diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f19549d..e771a4a 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1256,11 +1256,11 @@ void cmLocalVisualStudio7GeneratorInternals::OutputLibraries( for (auto const& lib : libs) { if (lib.IsPath) { std::string rel = - lg->MaybeConvertToRelativePath(currentBinDir, lib.Value.c_str()); + lg->MaybeConvertToRelativePath(currentBinDir, lib.Value.Value.c_str()); fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " "; } else if (!lib.Target || lib.Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { - fout << lib.Value << " "; + fout << lib.Value.Value << " "; } } } diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 5857477..f220ea5 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3233,13 +3233,13 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions( if (l.IsPath) { std::string path = this->LocalGenerator->MaybeConvertToRelativePath( - currentBinDir, l.Value); + currentBinDir, l.Value.Value); ConvertToWindowsSlash(path); - if (!cmVS10IsTargetsFile(l.Value)) { + if (!cmVS10IsTargetsFile(l.Value.Value)) { libVec.push_back(path); } } else { - libVec.push_back(l.Value); + libVec.push_back(l.Value.Value); } } @@ -3804,9 +3804,9 @@ bool cmVisualStudio10TargetGenerator::ComputeLibOptions( std::string currentBinDir = this->LocalGenerator->GetCurrentBinaryDirectory(); for (cmComputeLinkInformation::Item const& l : libs) { - if (l.IsPath && cmVS10IsTargetsFile(l.Value)) { + if (l.IsPath && cmVS10IsTargetsFile(l.Value.Value)) { std::string path = this->LocalGenerator->MaybeConvertToRelativePath( - currentBinDir, l.Value); + currentBinDir, l.Value.Value); ConvertToWindowsSlash(path); this->AddTargetsFileAndConfigPair(path, config); } @@ -3890,16 +3890,16 @@ void cmVisualStudio10TargetGenerator::AddLibraries( if (l.IsPath) { std::string path = this->LocalGenerator->MaybeConvertToRelativePath( - currentBinDir, l.Value); + currentBinDir, l.Value.Value); ConvertToWindowsSlash(path); - if (cmVS10IsTargetsFile(l.Value)) { + if (cmVS10IsTargetsFile(l.Value.Value)) { vsTargetVec.push_back(path); } else { libVec.push_back(path); } } else if (!l.Target || l.Target->GetType() != cmStateEnums::INTERFACE_LIBRARY) { - libVec.push_back(l.Value); + libVec.push_back(l.Value.Value); } } } |