summaryrefslogtreecommitdiffstats
path: root/Source/cmOrderLinkDirectories.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-04-04 18:25:17 (GMT)
committerBrad King <brad.king@kitware.com>2006-04-04 18:25:17 (GMT)
commit57a9e26c151f429bc41dd90e86bc50ada9600bd1 (patch)
tree85d6261d26a455c99ecb59a518058d26d0481081 /Source/cmOrderLinkDirectories.h
parente45ef47bb8081ddc20f3f1997f253184e4adfcc8 (diff)
downloadCMake-57a9e26c151f429bc41dd90e86bc50ada9600bd1.zip
CMake-57a9e26c151f429bc41dd90e86bc50ada9600bd1.tar.gz
CMake-57a9e26c151f429bc41dd90e86bc50ada9600bd1.tar.bz2
BUG: Fixed cmOrderLinkDirectories to make sure cmake-built libraries are found properly. Also taking libraries that will be built but may not yet exist into account. The per-configuration subdirectories that are included by generators in the link path are checked for conflicting libraries also. Potentially conflicting libraries that are actually symlinks back to the desired library are no longer considered conflicting, which avoids bogus impossible ordering warnings.
Diffstat (limited to 'Source/cmOrderLinkDirectories.h')
-rw-r--r--Source/cmOrderLinkDirectories.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmOrderLinkDirectories.h b/Source/cmOrderLinkDirectories.h
index f5aca3d..37c1462 100644
--- a/Source/cmOrderLinkDirectories.h
+++ b/Source/cmOrderLinkDirectories.h
@@ -51,7 +51,9 @@ public:
///! set link information from the target
void SetLinkInformation(const char* targetName,
const std::vector<std::string>& linkLibraries,
- const std::vector<std::string>& linkDirectories);
+ const std::vector<std::string>& linkDirectories,
+ const cmTargetManifest& manifest,
+ const char* configSubdir);
///! Compute the best order for -L paths from GetLinkLibraries
bool DetermineLibraryPathOrder();
///! Get the results from DetermineLibraryPathOrder
@@ -103,7 +105,8 @@ private:
std::vector<cmStdString>& libs,
std::vector<cmStdString>& sortedPaths);
void PrepareLinkTargets();
- bool LibraryInDirectory(const char* dir, const char* lib);
+ bool LibraryInDirectory(const char* desiredLib,
+ const char* dir, const char* lib);
void FindLibrariesInSearchPaths();
void FindIndividualLibraryOrders();
void PrintMap(const char* name,
@@ -114,7 +117,11 @@ private:
void OrderPaths(std::vector<cmStdString>& paths);
bool FindPathNotInDirectoryToAfterList(cmStdString& path);
std::string NoCaseExpression(const char* str);
+ bool LibraryMayConflict(const char* desiredLib,
+ const char* dir, const char* fname);
private:
+ // set of files that will exist when the build occurs
+ std::set<cmStdString> ManifestFiles;
// map from library to directories that it is in other than its full path
std::map<cmStdString, std::vector<cmStdString> > LibraryToDirectories;
// map from directory to vector of directories that must be after it
@@ -144,6 +151,8 @@ private:
std::set<cmStdString> ImpossibleDirectories;
// Name of target
cmStdString TargetName;
+ // Subdirectory used for this configuration if any.
+ cmStdString ConfigSubdir;
// library regular expressions
cmsys::RegularExpression RemoveLibraryExtension;
cmsys::RegularExpression ExtractBaseLibraryName;