From 34ea17901372f02b949907662c939916b2eea453 Mon Sep 17 00:00:00 2001 From: Tim Gallagher Date: Thu, 17 Mar 2011 17:27:27 -0400 Subject: Modified the FindHDF5.cmake file to locate the Fortran bindings. --- Modules/FindHDF5.cmake | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 90849a1..5c500a2 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -9,10 +9,9 @@ # The module will optionally accept the COMPONENTS argument. If no COMPONENTS # are specified, then the find module will default to finding only the HDF5 C # library. If one or more COMPONENTS are specified, the module will attempt to -# find the language bindings for the specified components. Currently, the only -# valid components are C and CXX. The module does not yet support finding the -# Fortran bindings. If the COMPONENTS argument is not given, the module will -# attempt to find only the C bindings. +# find the language bindings for the specified components. The only valid +# components are C, CXX, and Fortran. If the COMPONENTS argument is not +# given, the module will attempt to find only the C bindings. # # On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES # to determine whether or not to prefer a static link to a dynamic link for HDF5 @@ -33,12 +32,14 @@ # HDF5_DEFINITIONS - Required compiler definitions for HDF5 # HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings. # HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings +# HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings # HDF5_LIBRARIES - Required libraries for all requested bindings # HDF5_FOUND - true if HDF5 was found on the system # HDF5_LIBRARY_DIRS - the full set of library directories # HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support # HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler # HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler +# HDF5_Fortran_COMPILER_EXECUTABLE - the path to the HDF5 Fortran wrapper compiler # HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool #============================================================================= @@ -57,12 +58,13 @@ # This module is maintained by Will Dicharry . include(SelectLibraryConfigurations) -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +include(FindPackageHandleStandardArgs) # List of the valid HDF5 components set( HDF5_VALID_COMPONENTS C CXX + Fortran ) # try to find the HDF5 wrapper compilers @@ -80,6 +82,13 @@ find_program( HDF5_CXX_COMPILER_EXECUTABLE DOC "HDF5 C++ Wrapper compiler. Used only to detect HDF5 compile flags." ) mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE ) +find_program( HDF5_Fortran_COMPILER_EXECUTABLE + NAMES h5fc h5pfc + HINTS ENV HDF5_ROOT + PATH_SUFFIXES bin Bin + DOC "HDF5 Fortran Wrapper compiler. Used only to detect HDF5 compile flags." ) +mark_as_advanced( HDF5_Fortran_COMPILER_EXECUTABLE ) + find_program( HDF5_DIFF_EXECUTABLE NAMES h5diff HINTS ENV HDF5_ROOT @@ -158,6 +167,7 @@ if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES ) else() _HDF5_invoke_compiler( C HDF5_C_COMPILE_LINE HDF5_C_RETURN_VALUE ) _HDF5_invoke_compiler( CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE ) + _HDF5_invoke_compiler( Fortran HDF5_Fortran_COMPILE_LINE HDF5_Fortran_RETURN_VALUE ) if( NOT HDF5_FIND_COMPONENTS ) set( HDF5_LANGUAGE_BINDINGS "C" ) @@ -177,6 +187,7 @@ else() # seed the initial lists of libraries to find with items we know we need set( HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5 ) set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} ) + set( HDF5_Fortran_LIBRARY_NAMES_INIT hdf5_fortran ${HDF5_C_LIBRARY_NAMES_INIT} ) foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} ) if( HDF5_${LANGUAGE}_COMPILE_LINE ) @@ -198,7 +209,13 @@ else() list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} ) # find the HDF5 include directories - find_path( HDF5_${LANGUAGE}_INCLUDE_DIR hdf5.h + if(${LANGUAGE} STREQUAL "Fortran") + set(HDF5_INCLUDE_FILENAME hdf5.mod) + else() + set(HDF5_INCLUDE_FILENAME hdf5.h) + endif() + + find_path( HDF5_${LANGUAGE}_INCLUDE_DIR ${HDF5_INCLUDE_FILENAME} HINTS ${HDF5_${LANGUAGE}_INCLUDE_FLAGS} ENV @@ -320,7 +337,8 @@ mark_as_advanced( HDF5_DEFINTIONS HDF5_LIBRARY_DIRS HDF5_C_COMPILER_EXECUTABLE - HDF5_CXX_COMPILER_EXECUTABLE ) + HDF5_CXX_COMPILER_EXECUTABLE + HDF5_Fortran_COMPILER_EXECUTABLE ) # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of # HDF5_INCLUDE_DIRS -- cgit v0.12 From 063ac873ce004ab1affe78be3fe0344a6f87cb79 Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Mon, 16 May 2011 13:22:57 -0600 Subject: HDF5 high level library is a find COMPONENT now. The HDF5 high level library was originally hard coded as a dependency when the C bindings are desired. The high level API is now requested as a COMPONENT. --- Modules/FindHDF5.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 5c500a2..878a355 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -10,7 +10,7 @@ # are specified, then the find module will default to finding only the HDF5 C # library. If one or more COMPONENTS are specified, the module will attempt to # find the language bindings for the specified components. The only valid -# components are C, CXX, and Fortran. If the COMPONENTS argument is not +# components are C, CXX, Fortran, and HL. If the COMPONENTS argument is not # given, the module will attempt to find only the C bindings. # # On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES @@ -33,6 +33,7 @@ # HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings. # HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings # HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings +# HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API # HDF5_LIBRARIES - Required libraries for all requested bindings # HDF5_FOUND - true if HDF5 was found on the system # HDF5_LIBRARY_DIRS - the full set of library directories @@ -65,6 +66,7 @@ set( HDF5_VALID_COMPONENTS C CXX Fortran + HL ) # try to find the HDF5 wrapper compilers @@ -185,7 +187,8 @@ else() endif() # seed the initial lists of libraries to find with items we know we need - set( HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5 ) + set( HDF5_C_LIBRARY_NAMES_INIT hdf5 ) + set( HDF5_HL_LIBRARY_NAMES_INIT hdf5_hl ${HDF5_C_LIBRARY_NAMES_INIT} ) set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} ) set( HDF5_Fortran_LIBRARY_NAMES_INIT hdf5_fortran ${HDF5_C_LIBRARY_NAMES_INIT} ) @@ -234,7 +237,9 @@ else() ${HDF5_${LANGUAGE}_LIBRARY_NAMES} ) # find the HDF5 libraries + message( STATUS "FindHDF5 -- search for ${LANGUAGE}" ) foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} ) + message( STATUS "FindHDF5 -- Searching for ${LIB}" ) if( UNIX AND HDF5_USE_STATIC_LIBRARIES ) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. -- cgit v0.12 From 3978f3221fd58bc719ee5848d8cc41d0b0f6e47d Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Mon, 16 May 2011 14:19:22 -0600 Subject: Add logic for CMake built HDF5 install. The find module calls find_package( HDF5 QUIET NO_MODULE ). If that succeeds, the find module variables are set based on the imported target locations. --- Modules/FindHDF5.cmake | 52 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 878a355..f3afb69 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -69,6 +69,22 @@ set( HDF5_VALID_COMPONENTS HL ) +# Validate the list of find components. +if( NOT HDF5_FIND_COMPONENTS ) + set( HDF5_LANGUAGE_BINDINGS "C" ) +else() + # add the extra specified components, ensuring that they are valid. + foreach( component ${HDF5_FIND_COMPONENTS} ) + list( FIND HDF5_VALID_COMPONENTS ${component} component_location ) + if( ${component_location} EQUAL -1 ) + message( FATAL_ERROR + "\"${component}\" is not a valid HDF5 component." ) + else() + list( APPEND HDF5_LANGUAGE_BINDINGS ${component} ) + endif() + endforeach() +endif() + # try to find the HDF5 wrapper compilers find_program( HDF5_C_COMPILER_EXECUTABLE NAMES h5cc h5pcc @@ -163,6 +179,27 @@ macro( _HDF5_parse_compile_line endforeach() endmacro() +# Try to find HDF5 using an installed hdf5-config.cmake +find_package( HDF5 QUIET NO_MODULE ) +if( HDF5_INCLUDE_DIR ) + set( HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR} ) + set( HDF5_LIBRARIES ) + set( HDF5_C_TARGET hdf5 ) + set( HDF5_CXX_TARGET hdf5_cpp ) + set( HDF5_HL_TARGET hdf5_hl ) + set( HDF5_Fortran_TARGET hdf5_fortran ) + foreach( _component ${HDF5_LANGUAGE_BINDINGS} ) + list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location ) + get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION ) + if( _comp_location ) + set( HDF5_${_component}_LIBRARY ${_comp_location} CACHE PATH + "HDF5 ${_component} library" ) + mark_as_advanced( HDF5_${_component}_LIBRARY ) + list( APPEND HDF5_LIBRARIES ${HDF5_${_component}_LIBRARY} ) + endif() + endforeach() +endif() + if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES ) # Do nothing: we already have HDF5_INCLUDE_PATH and HDF5_LIBRARIES in the # cache, it would be a shame to override them @@ -171,21 +208,6 @@ else() _HDF5_invoke_compiler( CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE ) _HDF5_invoke_compiler( Fortran HDF5_Fortran_COMPILE_LINE HDF5_Fortran_RETURN_VALUE ) - if( NOT HDF5_FIND_COMPONENTS ) - set( HDF5_LANGUAGE_BINDINGS "C" ) - else() - # add the extra specified components, ensuring that they are valid. - foreach( component ${HDF5_FIND_COMPONENTS} ) - list( FIND HDF5_VALID_COMPONENTS ${component} component_location ) - if( ${component_location} EQUAL -1 ) - message( FATAL_ERROR - "\"${component}\" is not a valid HDF5 component." ) - else() - list( APPEND HDF5_LANGUAGE_BINDINGS ${component} ) - endif() - endforeach() - endif() - # seed the initial lists of libraries to find with items we know we need set( HDF5_C_LIBRARY_NAMES_INIT hdf5 ) set( HDF5_HL_LIBRARY_NAMES_INIT hdf5_hl ${HDF5_C_LIBRARY_NAMES_INIT} ) -- cgit v0.12 From 2ba826e0600902b01750d345e2f51dd3ab0a9c4a Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Tue, 24 May 2011 12:53:49 -0600 Subject: Use CMAKE_CURRENT_LIST_DIR to locate FindPackageHandleStandardArgs. --- Modules/FindHDF5.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index f3afb69..3c96720 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -59,7 +59,7 @@ # This module is maintained by Will Dicharry . include(SelectLibraryConfigurations) -include(FindPackageHandleStandardArgs) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) # List of the valid HDF5 components set( HDF5_VALID_COMPONENTS -- cgit v0.12 From 4e1228442429c526c451426cdf75c3ae08581103 Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Tue, 24 May 2011 15:27:30 -0600 Subject: Use HDF5_FOUND to control autoconf and CMake built FindHDF5. --- Modules/FindHDF5.cmake | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 3c96720..1b41ae6 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -180,30 +180,29 @@ macro( _HDF5_parse_compile_line endmacro() # Try to find HDF5 using an installed hdf5-config.cmake -find_package( HDF5 QUIET NO_MODULE ) -if( HDF5_INCLUDE_DIR ) - set( HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR} ) - set( HDF5_LIBRARIES ) - set( HDF5_C_TARGET hdf5 ) - set( HDF5_CXX_TARGET hdf5_cpp ) - set( HDF5_HL_TARGET hdf5_hl ) - set( HDF5_Fortran_TARGET hdf5_fortran ) - foreach( _component ${HDF5_LANGUAGE_BINDINGS} ) - list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location ) - get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION ) - if( _comp_location ) - set( HDF5_${_component}_LIBRARY ${_comp_location} CACHE PATH - "HDF5 ${_component} library" ) - mark_as_advanced( HDF5_${_component}_LIBRARY ) - list( APPEND HDF5_LIBRARIES ${HDF5_${_component}_LIBRARY} ) - endif() - endforeach() +if( NOT HDF5_FOUND ) + find_package( HDF5 QUIET NO_MODULE ) + if( HDF5_FOUND ) + set( HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR} ) + set( HDF5_LIBRARIES ) + set( HDF5_C_TARGET hdf5 ) + set( HDF5_CXX_TARGET hdf5_cpp ) + set( HDF5_HL_TARGET hdf5_hl ) + set( HDF5_Fortran_TARGET hdf5_fortran ) + foreach( _component ${HDF5_LANGUAGE_BINDINGS} ) + list( FIND HDF5_VALID_COMPONENTS ${_component} _component_location ) + get_target_property( _comp_location ${HDF5_${_component}_TARGET} LOCATION ) + if( _comp_location ) + set( HDF5_${_component}_LIBRARY ${_comp_location} CACHE PATH + "HDF5 ${_component} library" ) + mark_as_advanced( HDF5_${_component}_LIBRARY ) + list( APPEND HDF5_LIBRARIES ${HDF5_${_component}_LIBRARY} ) + endif() + endforeach() + endif() endif() -if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES ) - # Do nothing: we already have HDF5_INCLUDE_PATH and HDF5_LIBRARIES in the - # cache, it would be a shame to override them -else() +if( NOT HDF5_FOUND ) _HDF5_invoke_compiler( C HDF5_C_COMPILE_LINE HDF5_C_RETURN_VALUE ) _HDF5_invoke_compiler( CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE ) _HDF5_invoke_compiler( Fortran HDF5_Fortran_COMPILE_LINE HDF5_Fortran_RETURN_VALUE ) @@ -259,9 +258,7 @@ else() ${HDF5_${LANGUAGE}_LIBRARY_NAMES} ) # find the HDF5 libraries - message( STATUS "FindHDF5 -- search for ${LANGUAGE}" ) foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} ) - message( STATUS "FindHDF5 -- Searching for ${LIB}" ) if( UNIX AND HDF5_USE_STATIC_LIBRARIES ) # According to bug 1643 on the CMake bug tracker, this is the # preferred method for searching for a static library. @@ -358,16 +355,18 @@ find_package_handle_standard_args( HDF5 DEFAULT_MSG HDF5_INCLUDE_DIRS ) -mark_as_advanced( - HDF5_INCLUDE_DIRS - HDF5_LIBRARIES - HDF5_DEFINTIONS - HDF5_LIBRARY_DIRS - HDF5_C_COMPILER_EXECUTABLE - HDF5_CXX_COMPILER_EXECUTABLE - HDF5_Fortran_COMPILER_EXECUTABLE ) +if( HDF5_FOUND ) + mark_as_advanced( + HDF5_INCLUDE_DIRS + HDF5_LIBRARIES + HDF5_DEFINTIONS + HDF5_LIBRARY_DIRS + HDF5_C_COMPILER_EXECUTABLE + HDF5_CXX_COMPILER_EXECUTABLE + HDF5_Fortran_COMPILER_EXECUTABLE ) -# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of -# HDF5_INCLUDE_DIRS -set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" ) + # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of + # HDF5_INCLUDE_DIRS + set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" ) +endif() -- cgit v0.12 From 0584701ae4c73f0867734acb19c6ed92507ce514 Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Wed, 25 May 2011 12:38:54 -0600 Subject: Fix for bug 11752, mixed debug and release libraries. --- Modules/FindHDF5.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 1b41ae6..f1805cd 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -324,9 +324,13 @@ if( NOT HDF5_FOUND ) # Construct the complete list of HDF5 libraries with debug and optimized # variants when the generator supports them. if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( HDF5_LIBRARIES - debug ${HDF5_LIBRARIES_DEBUG} - optimized ${HDF5_LIBRARIES_RELEASE} ) + set( HDF5_LIBRARIES ) + foreach( _lib ${HDF5_LIBRARIES_DEBUG} ) + list( APPEND HDF5_LIBRARIES debug ${_lib} ) + endforeach() + foreach( _lib ${HDF5_LIBRARIES_RELEASE} ) + list( APPEND HDF5_LIBRARIES optimized ${_lib} ) + endforeach() else() set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} ) endif() -- cgit v0.12 From 93ba19e0709168e3c820f7936f81c0927b7bb392 Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Wed, 25 May 2011 12:53:28 -0600 Subject: FindHDF5 ensures good link lines when libraries are duplicated. Duplicates must be removed from the beginning of the link libraries to ensure unresolved symbols can be found. --- Modules/FindHDF5.cmake | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index f1805cd..92dad21 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -307,18 +307,29 @@ if( NOT HDF5_FOUND ) # We may have picked up some duplicates in various lists during the above # process for the language bindings (both the C and C++ bindings depend on - # libz for example). Remove the duplicates. + # libz for example). Remove the duplicates. It appears that the default + # CMake behavior is to remove duplicates from the end of a list. However, + # for link lines, this is incorrect since unresolved symbols are searched + # for down the link line. Therefore, we reverse the list, remove the + # duplicates, and then reverse it again to get the duplicates removed from + # the beginning. + macro( _remove_duplicates_from_beginning _list_name ) + list( REVERSE ${_list_name} ) + list( REMOVE_DUPLICATES ${_list_name} ) + list( REVERSE ${_list_name} ) + endmacro() + if( HDF5_INCLUDE_DIRS ) - list( REMOVE_DUPLICATES HDF5_INCLUDE_DIRS ) + _remove_duplicates_from_beginning( HDF5_INCLUDE_DIRS ) endif() if( HDF5_LIBRARIES_DEBUG ) - list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG ) + _remove_duplicates_from_beginning( HDF5_LIBRARIES_DEBUG ) endif() if( HDF5_LIBRARIES_RELEASE ) - list( REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE ) + _remove_duplicates_from_beginning( HDF5_LIBRARIES_RELEASE ) endif() if( HDF5_LIBRARY_DIRS ) - list( REMOVE_DUPLICATES HDF5_LIBRARY_DIRS ) + _remove_duplicates_from_beginning( HDF5_LIBRARY_DIRS ) endif() # Construct the complete list of HDF5 libraries with debug and optimized -- cgit v0.12 From e38216c6e97b7ba6dbac0829ae9cdf72525cc5cd Mon Sep 17 00:00:00 2001 From: Will Dicharry Date: Wed, 25 May 2011 13:19:26 -0600 Subject: Remove unnecessary mark_as_advanced from FindHDF5. --- Modules/FindHDF5.cmake | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 92dad21..6f01ea0 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -363,6 +363,12 @@ if( NOT HDF5_FOUND ) "HDF5 library compiled with parallel IO support" ) mark_as_advanced( HDF5_IS_PARALLEL ) + # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of + # HDF5_INCLUDE_DIRS + if( HDF5_INCLUDE_DIRS ) + set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" ) + endif() + endif() find_package_handle_standard_args( HDF5 DEFAULT_MSG @@ -370,18 +376,3 @@ find_package_handle_standard_args( HDF5 DEFAULT_MSG HDF5_INCLUDE_DIRS ) -if( HDF5_FOUND ) - mark_as_advanced( - HDF5_INCLUDE_DIRS - HDF5_LIBRARIES - HDF5_DEFINTIONS - HDF5_LIBRARY_DIRS - HDF5_C_COMPILER_EXECUTABLE - HDF5_CXX_COMPILER_EXECUTABLE - HDF5_Fortran_COMPILER_EXECUTABLE ) - - # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of - # HDF5_INCLUDE_DIRS - set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" ) -endif() - -- cgit v0.12