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
Jussi Kukkonen
CMake
Commits
9703b32c
Commit
9703b32c
authored
Jun 02, 2016
by
Brad King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'FindHDF5-fix-already-found' into release
parents
7e8cfb95
f11243d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
Modules/FindHDF5.cmake
Modules/FindHDF5.cmake
+11
-4
No files found.
Modules/FindHDF5.cmake
View file @
9703b32c
...
...
@@ -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
...
...
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