diff options
author | Brad King <brad.king@kitware.com> | 2008-02-21 16:41:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-21 16:41:11 (GMT) |
commit | fd37a6ec3d31e65eed2dfa88246e86b8d0ab66ab (patch) | |
tree | e40d02f354785ea8c43e90f266cded73bba5f340 /Source/cmComputeLinkInformation.h | |
parent | 9f2f456e7db1f84cc6d10a64a8e515ad69afbe65 (diff) | |
download | CMake-fd37a6ec3d31e65eed2dfa88246e86b8d0ab66ab.zip CMake-fd37a6ec3d31e65eed2dfa88246e86b8d0ab66ab.tar.gz CMake-fd37a6ec3d31e65eed2dfa88246e86b8d0ab66ab.tar.bz2 |
ENH: Better linker search path computation.
- Use linker search path -L.. -lfoo for lib w/out soname
when platform sets CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME
- Rename cmOrderRuntimeDirectories to cmOrderDirectories
and generalize it for both soname constraints and link
library constraints
- Use cmOrderDirectories to order -L directories based
on all needed constraints
- Avoid processing implicit link directories
- For CMAKE_OLD_LINK_PATHS add constraints from libs
producing them to produce old ordering
Diffstat (limited to 'Source/cmComputeLinkInformation.h')
-rw-r--r-- | Source/cmComputeLinkInformation.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h index 0145e78..c0f8b5c 100644 --- a/Source/cmComputeLinkInformation.h +++ b/Source/cmComputeLinkInformation.h @@ -26,7 +26,7 @@ class cmGlobalGenerator; class cmLocalGenerator; class cmMakefile; class cmTarget; -class cmOrderRuntimeDirectories; +class cmOrderDirectories; /** \class cmComputeLinkInformation * \brief Compute link information for a target in one configuration. @@ -89,9 +89,10 @@ private: // Modes for dealing with dependent shared libraries. enum SharedDepMode { - SharedDepModeNone, // Drop - SharedDepModeDir, // Use in runtime information - SharedDepModeLink // List file on link line + SharedDepModeNone, // Drop + SharedDepModeDir, // List dir in -rpath-link flag + SharedDepModeLibDir, // List dir in linker search path + SharedDepModeLink // List file on link line }; // System info. @@ -104,6 +105,8 @@ private: std::string RuntimeSep; std::string RuntimeAlways; bool RuntimeUseChrpath; + bool NoSONameUsesPath; + bool LinkWithRuntimePath; std::string RPathLinkFlag; SharedDepMode SharedDependencyMode; @@ -124,7 +127,6 @@ private: std::vector<std::string> SharedLinkExtensions; std::vector<std::string> LinkExtensions; std::set<cmStdString> LinkPrefixes; - cmsys::RegularExpression RemoveLibraryExtension; cmsys::RegularExpression ExtractStaticLibraryName; cmsys::RegularExpression ExtractSharedLibraryName; cmsys::RegularExpression ExtractAnyLibraryName; @@ -133,7 +135,7 @@ private: std::string CreateExtensionRegex(std::vector<std::string> const& exts); std::string NoCaseExpression(const char* str); - // Handling of link items that are not targets or full file paths. + // Handling of link items. void AddTargetItem(std::string const& item, cmTarget* target); void AddFullItem(std::string const& item); bool CheckImplicitDirItem(std::string const& item); @@ -141,6 +143,8 @@ private: void AddDirectoryItem(std::string const& item); void AddFrameworkItem(std::string const& item); void DropDirectoryItem(std::string const& item); + bool CheckSharedLibNoSOName(std::string const& item); + void AddSharedLibNoSOName(std::string const& item); // Framework info. void ComputeFrameworkInfo(); @@ -149,23 +153,22 @@ private: cmsys::RegularExpression SplitFramework; // Linker search path computation. - void ComputeLinkerSearchDirectories(); - void AddLinkerSearchDirectories(std::vector<std::string> const& dirs); - std::set<cmStdString> DirectoriesEmmitted; + cmOrderDirectories* OrderLinkerSearchPath; + void FinishLinkerSearchDirectories(); std::set<cmStdString> ImplicitLinkDirs; // Linker search path compatibility mode. - std::vector<std::string> OldLinkDirs; + std::vector<std::string> OldLinkDirItems; bool OldLinkDirMode; bool HaveUserFlagItem; // Runtime path computation. - cmOrderRuntimeDirectories* OrderRuntimeSearchPath; + cmOrderDirectories* OrderRuntimeSearchPath; void AddLibraryRuntimeInfo(std::string const& fullPath, cmTarget* target); void AddLibraryRuntimeInfo(std::string const& fullPath); // Dependent library path computation. - cmOrderRuntimeDirectories* OrderDependentRPath; + cmOrderDirectories* OrderDependentRPath; }; #endif |