diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-07 22:51:05 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-12 16:39:58 (GMT) |
commit | 7c8236efa710372b6e54ba12934b075f718e0e15 (patch) | |
tree | 5114fea64f9f829604fa681a9d9c9e1e2929f4f0 | |
parent | c7645fca12870cef732f26730588cda3be072852 (diff) | |
download | CMake-7c8236efa710372b6e54ba12934b075f718e0e15.zip CMake-7c8236efa710372b6e54ba12934b075f718e0e15.tar.gz CMake-7c8236efa710372b6e54ba12934b075f718e0e15.tar.bz2 |
cmComputeLinkInformation: Port result API to cmGeneratorTarget.
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 4 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.h | 5 | ||||
-rw-r--r-- | Source/cmInstallTargetGenerator.cxx | 17 |
3 files changed, 11 insertions, 15 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index f7409f5..988e35a 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -471,7 +471,7 @@ std::vector<std::string> const& cmComputeLinkInformation::GetFrameworkPaths() } //---------------------------------------------------------------------------- -std::set<cmTarget const*> const& +const std::set<const cmGeneratorTarget*>& cmComputeLinkInformation::GetSharedLibrariesLinked() { return this->SharedLibrariesLinked; @@ -1093,7 +1093,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item, // Keep track of shared library targets linked. if(target->GetType() == cmTarget::SHARED_LIBRARY) { - this->SharedLibrariesLinked.insert(target->Target); + this->SharedLibrariesLinked.insert(target); } // Handle case of an imported shared library with no soname. diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 2aac1bc..5eecf7d 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -19,7 +19,6 @@ class cmake; class cmGlobalGenerator; class cmMakefile; -class cmTarget; class cmGeneratorTarget; class cmOrderDirectories; @@ -57,7 +56,7 @@ public: void GetRPath(std::vector<std::string>& runtimeDirs, bool for_install); std::string GetRPathString(bool for_install); std::string GetChrpathString(); - std::set<cmTarget const*> const& GetSharedLibrariesLinked(); + std::set<cmGeneratorTarget const*> const& GetSharedLibrariesLinked(); std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; } std::string GetRPathLinkString(); @@ -71,7 +70,7 @@ private: std::vector<std::string> Depends; std::vector<std::string> FrameworkPaths; std::vector<std::string> RuntimeSearchPath; - std::set<cmTarget const*> SharedLibrariesLinked; + std::set<cmGeneratorTarget const*> SharedLibrariesLinked; // Context information. cmGeneratorTarget const* Target; diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx index 2ea36fb..b3bc95a 100644 --- a/Source/cmInstallTargetGenerator.cxx +++ b/Source/cmInstallTargetGenerator.cxx @@ -563,12 +563,12 @@ cmInstallTargetGenerator std::map<std::string, std::string> install_name_remap; if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config)) { - std::set<cmTarget const*> const& sharedLibs + std::set<cmGeneratorTarget const*> const& sharedLibs = cli->GetSharedLibrariesLinked(); - for(std::set<cmTarget const*>::const_iterator j = sharedLibs.begin(); - j != sharedLibs.end(); ++j) + for(std::set<cmGeneratorTarget const*>::const_iterator j + = sharedLibs.begin(); j != sharedLibs.end(); ++j) { - cmTarget const* tgt = *j; + cmGeneratorTarget const* tgt = *j; // The install_name of an imported target does not change. if(tgt->IsImported()) @@ -576,20 +576,17 @@ cmInstallTargetGenerator continue; } - cmGeneratorTarget *gtgt = tgt->GetMakefile() - ->GetGlobalGenerator() - ->GetGeneratorTarget(tgt); // If the build tree and install tree use different path // components of the install_name field then we need to create a // mapping to be applied after installation. - std::string for_build = gtgt->GetInstallNameDirForBuildTree(config); - std::string for_install = gtgt->GetInstallNameDirForInstallTree(); + std::string for_build = tgt->GetInstallNameDirForBuildTree(config); + std::string for_install = tgt->GetInstallNameDirForInstallTree(); if(for_build != for_install) { // The directory portions differ. Append the filename to // create the mapping. std::string fname = - this->GetInstallFilename(tgt, config, NameSO); + this->GetInstallFilename(tgt->Target, config, NameSO); // Map from the build-tree install_name. for_build += fname; |