diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2015-09-09 20:03:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-09-14 18:43:38 (GMT) |
commit | 02440154fb457e481d44aa0a2c2134e1a66e0f4b (patch) | |
tree | fb84e1a5ae6927766b06262d774b1a735279c125 | |
parent | 4a6fe0290880bd56dd5141f06c9fa2b9e310162e (diff) | |
download | CMake-02440154fb457e481d44aa0a2c2134e1a66e0f4b.zip CMake-02440154fb457e481d44aa0a2c2134e1a66e0f4b.tar.gz CMake-02440154fb457e481d44aa0a2c2134e1a66e0f4b.tar.bz2 |
find_*: Fix search order when the environment duplicates some HINTS
Refactoring in the topic merged by commit v3.2.0-rc1~400 (Merge topic
'refactor-search-path-construction', 2014-11-13) introduced a bug that
filters out duplicate paths in an incorrect order. Restore the search
path to its documented order even when duplicate paths are present.
Reported-by: Marc CHEVRIER <marc.chevrier@sap.com>
-rw-r--r-- | Source/cmFindBase.cxx | 6 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index add06a7..e2f86ce 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -207,6 +207,10 @@ void cmFindBase::ExpandPaths() { this->FillCMakeEnvironmentPath(); } + } + this->FillUserHintsPath(); + if(!this->NoDefaultPath) + { if(!this->NoSystemEnvironmentPath) { this->FillSystemEnvironmentPath(); @@ -216,8 +220,6 @@ void cmFindBase::ExpandPaths() this->FillCMakeSystemVariablePath(); } } - - this->FillUserHintsPath(); this->FillUserGuessPath(); } diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 68a6558..bf4033e 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1133,6 +1133,10 @@ void cmFindPackageCommand::ComputePrefixes() { this->FillPrefixesCMakeEnvironment(); } + } + this->FillPrefixesUserHints(); + if(!this->NoDefaultPath) + { if(!this->NoSystemEnvironmentPath) { this->FillPrefixesSystemEnvironment(); @@ -1150,7 +1154,6 @@ void cmFindPackageCommand::ComputePrefixes() this->FillPrefixesSystemRegistry(); } } - this->FillPrefixesUserHints(); this->FillPrefixesUserGuess(); this->ComputeFinalPaths(); |