Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
c5d2b99c
Commit
c5d2b99c
authored
Jul 17, 2017
by
Chuck Atkins
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find_package: Add missing PACKAGE_ROOT_PATH search path implementation.
parent
f15cfd89
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
Source/cmFindPackageCommand.cxx
Source/cmFindPackageCommand.cxx
+20
-0
Source/cmFindPackageCommand.h
Source/cmFindPackageCommand.h
+1
-0
No files found.
Source/cmFindPackageCommand.cxx
View file @
c5d2b99c
...
...
@@ -1090,6 +1090,9 @@ void cmFindPackageCommand::AppendSuccessInformation()
void
cmFindPackageCommand
::
ComputePrefixes
()
{
if
(
!
this
->
NoDefaultPath
)
{
if
(
!
this
->
NoPackageRootPath
)
{
this
->
FillPrefixesPackageRoot
();
}
if
(
!
this
->
NoCMakePath
)
{
this
->
FillPrefixesCMakeVariable
();
}
...
...
@@ -1117,6 +1120,23 @@ void cmFindPackageCommand::ComputePrefixes()
this
->
ComputeFinalPaths
();
}
void
cmFindPackageCommand
::
FillPrefixesPackageRoot
()
{
cmSearchPath
&
paths
=
this
->
LabeledPaths
[
PathLabel
::
PackageRoot
];
// Add package specific search prefixes
// NOTE: This should be using const_reverse_iterator but HP aCC and
// Oracle sunCC both currently have standard library issues
// with the reverse iterator APIs.
for
(
std
::
deque
<
std
::
string
>::
reverse_iterator
pkg
=
this
->
Makefile
->
FindPackageModuleStack
.
rbegin
();
pkg
!=
this
->
Makefile
->
FindPackageModuleStack
.
rend
();
++
pkg
)
{
std
::
string
varName
=
*
pkg
+
"_ROOT"
;
paths
.
AddCMakePath
(
varName
);
paths
.
AddEnvPath
(
varName
);
}
}
void
cmFindPackageCommand
::
FillPrefixesCMakeEnvironment
()
{
cmSearchPath
&
paths
=
this
->
LabeledPaths
[
PathLabel
::
CMakeEnvironment
];
...
...
Source/cmFindPackageCommand.h
View file @
c5d2b99c
...
...
@@ -100,6 +100,7 @@ private:
void
StoreVersionFound
();
void
ComputePrefixes
();
void
FillPrefixesPackageRoot
();
void
FillPrefixesCMakeEnvironment
();
void
FillPrefixesCMakeVariable
();
void
FillPrefixesSystemEnvironment
();
...
...
Brad King
@brad.king
mentioned in commit
18cbf898
·
Aug 04, 2017
mentioned in commit
18cbf898
mentioned in commit 18cbf898f8a4e9d24d56932b78ceb5da4c5387ff
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment