diff options
author | Brad King <brad.king@kitware.com> | 2017-02-02 14:13:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-03 14:12:05 (GMT) |
commit | 3d5ad7236c8ce444323fb63cd9ff50fb5f757830 (patch) | |
tree | 0a27b170cfeea9dc22c070bfa3d9a51eb1223ea8 /Modules/FindHDF5.cmake | |
parent | ae89967f9dc9308003630531ef34764030f98bd0 (diff) | |
download | CMake-3d5ad7236c8ce444323fb63cd9ff50fb5f757830.zip CMake-3d5ad7236c8ce444323fb63cd9ff50fb5f757830.tar.gz CMake-3d5ad7236c8ce444323fb63cd9ff50fb5f757830.tar.bz2 |
FindHDF5: Initialize/finalize internal search options variable
While at it, use a more private name.
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r-- | Modules/FindHDF5.cmake | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index cf84918..99b2309 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -609,13 +609,15 @@ elseif(NOT HDF5_FOUND AND NOT _HDF5_NEED_TO_SEARCH) endif() if(HDF5_ROOT) - set(SEARCH_OPTS NO_DEFAULT_PATH) + set(_HDF5_SEARCH_OPTS NO_DEFAULT_PATH) +else() + set(_HDF5_SEARCH_OPTS) endif() find_program( HDF5_DIFF_EXECUTABLE NAMES h5diff HINTS ${HDF5_ROOT} PATH_SUFFIXES bin Bin - ${SEARCH_OPTS} + ${_HDF5_SEARCH_OPTS} DOC "HDF5 file differencing tool." ) mark_as_advanced( HDF5_DIFF_EXECUTABLE ) @@ -644,7 +646,7 @@ if( NOT HDF5_FOUND ) HINTS ${HDF5_ROOT} PATHS $ENV{HOME}/.local/include PATH_SUFFIXES include Include - ${SEARCH_OPTS} + ${_HDF5_SEARCH_OPTS} ) mark_as_advanced(HDF5_${LANGUAGE}_INCLUDE_DIR) list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIR}) @@ -668,12 +670,12 @@ if( NOT HDF5_FOUND ) find_library(HDF5_${LIB}_LIBRARY_DEBUG NAMES ${THIS_LIBRARY_SEARCH_DEBUG} HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib - ${SEARCH_OPTS} + ${_HDF5_SEARCH_OPTS} ) find_library( HDF5_${LIB}_LIBRARY_RELEASE NAMES ${THIS_LIBRARY_SEARCH_RELEASE} HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib - ${SEARCH_OPTS} + ${_HDF5_SEARCH_OPTS} ) select_library_configurations( HDF5_${LIB} ) list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${LIB}_LIBRARY}) @@ -705,12 +707,12 @@ if( NOT HDF5_FOUND ) find_library(HDF5_${LIB}_LIBRARY_DEBUG NAMES ${THIS_LIBRARY_SEARCH_DEBUG} HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib - ${SEARCH_OPTS} + ${_HDF5_SEARCH_OPTS} ) find_library( HDF5_${LIB}_LIBRARY_RELEASE NAMES ${THIS_LIBRARY_SEARCH_RELEASE} HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib - ${SEARCH_OPTS} + ${_HDF5_SEARCH_OPTS} ) select_library_configurations( HDF5_${LIB} ) list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${LIB}_LIBRARY}) @@ -785,3 +787,5 @@ find_package_handle_standard_args(HDF5 VERSION_VAR HDF5_VERSION HANDLE_COMPONENTS ) + +unset(_HDF5_SEARCH_OPTS) |