Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CMake
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Golden
CMake
Commits
f11243d1
Commit
f11243d1
authored
8 years ago
by
Chuck Atkins
Browse files
Options
Downloads
Patches
Plain Diff
FindHDF5: Add backwards compatability for already-found searches
parent
91f6e790
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/FindHDF5.cmake
+11
-4
11 additions, 4 deletions
Modules/FindHDF5.cmake
with
11 additions
and
4 deletions
Modules/FindHDF5.cmake
+
11
−
4
View file @
f11243d1
...
...
@@ -345,7 +345,7 @@ macro( _HDF5_parse_compile_line
endmacro
()
# Try to find HDF5 using an installed hdf5-config.cmake
if
(
NOT HDF5_
ROOT
AND NOT HDF5_
FOUND
)
if
(
NOT HDF5_
FOUND
AND NOT HDF5_
ROOT
)
find_package
(
HDF5 QUIET NO_MODULE
)
if
(
HDF5_FOUND
)
set
(
HDF5_INCLUDE_DIRS
${
HDF5_INCLUDE_DIR
}
)
...
...
@@ -382,7 +382,7 @@ if(NOT HDF5_ROOT AND NOT HDF5_FOUND)
endif
()
endif
()
if
(
NOT HDF5_
ROOT
AND NOT HDF5_
FOUND
)
if
(
NOT HDF5_
FOUND
AND NOT HDF5_
ROOT
)
set
(
_HDF5_NEED_TO_SEARCH False
)
set
(
HDF5_COMPILER_NO_INTERROGATE True
)
# Only search for languages we've enabled
...
...
@@ -488,12 +488,12 @@ else()
set
(
_HDF5_NEED_TO_SEARCH True
)
endif
()
if
(
HDF5_COMPILER_NO_INTERROGATE
)
if
(
NOT HDF5_FOUND AND
HDF5_COMPILER_NO_INTERROGATE
)
# No arguments necessary, all languages can use the compiler wrappers
set
(
HDF5_FOUND True
)
set
(
HDF5_METHOD
"Included by compiler wrappers"
)
set
(
HDF5_REQUIRED_VARS HDF5_METHOD
)
elseif
(
NOT _HDF5_NEED_TO_SEARCH
)
elseif
(
NOT
HDF5_FOUND AND NOT
_HDF5_NEED_TO_SEARCH
)
# Compiler wrappers aren't being used by the build but were found and used
# to determine necessary include and library flags
set
(
HDF5_INCLUDE_DIRS
)
...
...
@@ -680,6 +680,13 @@ if( NOT HDF5_FOUND )
endif
()
endif
()
# If HDF5_REQUIRED_VARS is empty at this point, then it's likely that
# something external is trying to explicitly pass already found
# locations
if
(
NOT HDF5_REQUIRED_VARS
)
set
(
HDF5_REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS
)
endif
()
find_package_handle_standard_args
(
HDF5
REQUIRED_VARS
${
HDF5_REQUIRED_VARS
}
VERSION_VAR HDF5_VERSION
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment