diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-13 14:52:34 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-13 14:52:34 (GMT) |
commit | 72b38e3aa7ba5fa4a70144e05de36bc99fda173a (patch) | |
tree | 744005aab47678a2a742267a01799a8f53dd0cf7 /Source/cmOrderLinkDirectories.h | |
parent | 8883613cc022d0ae2c96d84adf79dd82b74df658 (diff) | |
download | CMake-72b38e3aa7ba5fa4a70144e05de36bc99fda173a.zip CMake-72b38e3aa7ba5fa4a70144e05de36bc99fda173a.tar.gz CMake-72b38e3aa7ba5fa4a70144e05de36bc99fda173a.tar.bz2 |
ENH: merge changes from the main tree to the 2.4 branch
Diffstat (limited to 'Source/cmOrderLinkDirectories.h')
-rw-r--r-- | Source/cmOrderLinkDirectories.h | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/Source/cmOrderLinkDirectories.h b/Source/cmOrderLinkDirectories.h index 3f42143..a3bc75a 100644 --- a/Source/cmOrderLinkDirectories.h +++ b/Source/cmOrderLinkDirectories.h @@ -66,19 +66,28 @@ public: // should be set from CMAKE_STATIC_LIBRARY_SUFFIX, // CMAKE_SHARED_LIBRARY_SUFFIX // CMAKE_LINK_LIBRARY_SUFFIX - void AddLinkExtension(const char* e) + enum LinkType { LinkUnknown, LinkStatic, LinkShared }; + void AddLinkExtension(const char* e, LinkType type = LinkUnknown) { if(e && *e) { + if(type == LinkStatic) + { + this->StaticLinkExtensions.push_back(e); + } + if(type == LinkShared) + { + this->SharedLinkExtensions.push_back(e); + } this->LinkExtensions.push_back(e); } } // should be set from CMAKE_STATIC_LIBRARY_PREFIX - void SetLinkPrefix(const char* s) + void AddLinkPrefix(const char* s) { if(s) { - this->LinkPrefix = s; + this->LinkPrefixes.insert(s); } } // Return any warnings if the exist @@ -86,6 +95,11 @@ public: // return a list of all full path libraries void GetFullPathLibraries(std::vector<cmStdString>& libs); + // Provide flags for switching library link type. + void SetLinkTypeInformation(LinkType start_link_type, + const char* static_link_type_flag, + const char* shared_link_type_flag); + // structure to hold a full path library link item struct Library { @@ -101,6 +115,7 @@ public: private: void CreateRegularExpressions(); + std::string CreateExtensionRegex(std::vector<cmStdString> const& exts); void DetermineLibraryPathOrder(std::vector<cmStdString>& searchPaths, std::vector<cmStdString>& libs, std::vector<cmStdString>& sortedPaths); @@ -145,19 +160,31 @@ private: // This is the set of -L paths unsorted, but unique std::set<cmStdString> LinkPathSet; // the names of link extensions + std::vector<cmStdString> StaticLinkExtensions; + std::vector<cmStdString> SharedLinkExtensions; std::vector<cmStdString> LinkExtensions; // the names of link prefixes - cmStdString LinkPrefix; + std::set<cmStdString> LinkPrefixes; // set of directories that can not be put in the correct order std::set<cmStdString> ImpossibleDirectories; // Name of target cmStdString TargetName; // Subdirectory used for this configuration if any. cmStdString ConfigSubdir; + + // Link type adjustment. + LinkType StartLinkType; + LinkType CurrentLinkType; + cmStdString StaticLinkTypeFlag; + cmStdString SharedLinkTypeFlag; + bool LinkTypeEnabled; + void SetCurrentLinkType(LinkType lt); + // library regular expressions cmsys::RegularExpression RemoveLibraryExtension; - cmsys::RegularExpression ExtractBaseLibraryName; - cmsys::RegularExpression ExtractBaseLibraryNameNoPrefix; + cmsys::RegularExpression ExtractStaticLibraryName; + cmsys::RegularExpression ExtractSharedLibraryName; + cmsys::RegularExpression ExtractAnyLibraryName; cmsys::RegularExpression SplitFramework; bool Debug; }; |