1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2 # file Copyright.txt or https://cmake.org/licensing for details. 4 # See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/2575 6 #[=======================================================================[.rst: 10 Find HDF5, a library
for reading and writing
self describing array
data.
14 This module invokes the HDF5 wrapper compiler that should be installed
15 alongside HDF5. Depending upon the HDF5 Configuration, the wrapper
16 compiler is called either h5cc or h5pcc. If
this succeeds, the module
17 will then call the compiler with the -show argument to see what flags
18 are used when compiling an HDF5 client application.
20 The module will optionally accept the COMPONENTS argument. If no
21 COMPONENTS are specified, then the find module will
default to finding
22 only the HDF5 C library. If one or more COMPONENTS are specified, the
23 module will attempt to find the
language bindings
for the specified
24 components. The only valid components are C, CXX, Fortran, HL, and
25 Fortran_HL. If the COMPONENTS argument is not given, the module will
26 attempt to find only the C bindings.
28 This module will read the variable
29 HDF5_USE_STATIC_LIBRARIES to determine whether or not to prefer a
30 static link to a dynamic link
for HDF5 and all of it
's dependencies. 31 To use this feature, make sure that the HDF5_USE_STATIC_LIBRARIES 32 variable is set before the call to find_package. 34 To provide the module with a hint about where to find your HDF5 35 installation, you can set the environment variable HDF5_ROOT. The 36 Find module will then look in this path when searching for HDF5 37 executables, paths, and libraries. 39 Both the serial and parallel HDF5 wrappers are considered and the first 40 directory to contain either one will be used. In the event that both appear 41 in the same directory the serial version is preferentially selected. This 42 behavior can be reversed by setting the variable HDF5_PREFER_PARALLEL to 45 In addition to finding the includes and libraries required to compile 46 an HDF5 client application, this module also makes an effort to find 47 tools that come with the HDF5 distribution that may be useful for 50 This module will define the following variables: 54 HDF5_FOUND - true if HDF5 was found on the system 55 HDF5_VERSION - HDF5 version in format Major.Minor.Release 56 HDF5_INCLUDE_DIRS - Location of the hdf5 includes 57 HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated) 58 HDF5_DEFINITIONS - Required compiler definitions for HDF5 59 HDF5_LIBRARIES - Required libraries for all requested bindings 60 HDF5_HL_LIBRARIES - Required libraries for the HDF5 high level API for all 61 bindings, if the HL component is enabled 63 Available components are: C CXX Fortran and HL. For each enabled language 64 binding, a corresponding HDF5_${LANG}_LIBRARIES variable, and potentially 65 HDF5_${LANG}_DEFINITIONS, will be defined. 66 If the HL component is enabled, then an HDF5_${LANG}_HL_LIBRARIES will 67 also be defined. With all components enabled, the following variables will be defined: 71 HDF5_C_DEFINITIONS -- Required compiler definitions for HDF5 C bindings 72 HDF5_CXX_DEFINITIONS -- Required compiler definitions for HDF5 C++ bindings 73 HDF5_Fortran_DEFINITIONS -- Required compiler definitions for HDF5 Fortran bindings 74 HDF5_C_INCLUDE_DIRS -- Required include directories for HDF5 C bindings 75 HDF5_CXX_INCLUDE_DIRS -- Required include directories for HDF5 C++ bindings 76 HDF5_Fortran_INCLUDE_DIRS -- Required include directories for HDF5 Fortran bindings 77 HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings 78 HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings 79 HDF5_Fortran_LIBRARIES - Required libraries for the HDF5 Fortran bindings 80 HDF5_C_HL_LIBRARIES - Required libraries for the high level C bindings 81 HDF5_CXX_HL_LIBRARIES - Required libraries for the high level C++ bindings 82 HDF5_Fortran_HL_LIBRARIES - Required libraries for the high level Fortran 85 HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support 86 HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler 87 HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler 88 HDF5_Fortran_COMPILER_EXECUTABLE - the path to the HDF5 Fortran wrapper compiler 89 HDF5_C_COMPILER_EXECUTABLE_NO_INTERROGATE - path to the primary C compiler 90 which is also the HDF5 wrapper 91 HDF5_CXX_COMPILER_EXECUTABLE_NO_INTERROGATE - path to the primary C++ 92 compiler which is also 94 HDF5_Fortran_COMPILER_EXECUTABLE_NO_INTERROGATE - path to the primary 95 Fortran compiler which 96 is also the HDF5 wrapper 97 HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool 99 With all components enabled, the following targets will be defined: 104 ``hdf5::hdf5_hl_cpp`` 105 ``hdf5::hdf5_fortran`` 107 ``hdf5::hdf5_hl_cpp`` 108 ``hdf5::hdf5_hl_fortran`` 111 The following variable can be set to guide the search for HDF5 libraries and includes: 114 Specify the path to the HDF5 installation to use. 117 Set to a true value to get some extra debugging output. 119 ``HDF5_NO_FIND_PACKAGE_CONFIG_FILE`` 120 Set to a true value to skip trying to find ``hdf5-config.cmake``. 121 #]=======================================================================] 123 # This module is maintained by Will Dicharry <wdicharry@stellarscience.com>. 125 include(SelectLibraryConfigurations) 126 include(FindPackageHandleStandardArgs) 128 # We haven't found HDF5 yet. Clear its state in
case it is
set in the parent
129 # scope somewhere else. We can't rely on it because different components may 130 # have been requested for this call. 133 # List of the valid HDF5 components
134 set(HDF5_VALID_LANGUAGE_BINDINGS C CXX Fortran)
136 # Validate the list of find components. 137 if(NOT HDF5_FIND_COMPONENTS)
138 set(HDF5_LANGUAGE_BINDINGS
"C")
140 set(HDF5_LANGUAGE_BINDINGS)
141 # add the extra specified components, ensuring that they are valid.
143 foreach(component IN LISTS HDF5_FIND_COMPONENTS)
144 list(FIND HDF5_VALID_LANGUAGE_BINDINGS ${
component} component_location)
145 if(NOT component_location EQUAL -1)
146 list(APPEND HDF5_LANGUAGE_BINDINGS ${
component})
147 elseif(component STREQUAL
"HL")
149 elseif(component STREQUAL
"Fortran_HL") # only
for compatibility
150 list(APPEND HDF5_LANGUAGE_BINDINGS Fortran)
152 set(HDF5_FIND_REQUIRED_Fortran_HL False)
153 set(HDF5_FIND_REQUIRED_Fortran True)
154 set(HDF5_FIND_REQUIRED_HL True)
156 message(FATAL_ERROR
"${component} is not a valid HDF5 component.")
159 if(NOT HDF5_LANGUAGE_BINDINGS)
160 get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES)
161 foreach(__lang IN LISTS __langs)
162 if(__lang MATCHES "^(C|CXX|Fortran)$")
163 list(APPEND HDF5_LANGUAGE_BINDINGS ${__lang})
167 list(REMOVE_ITEM HDF5_FIND_COMPONENTS Fortran_HL)
# replaced by Fortran and HL 168 list(REMOVE_DUPLICATES HDF5_LANGUAGE_BINDINGS)
171 # Determine whether to search for serial or parallel executable first 172 if(HDF5_PREFER_PARALLEL)
173 set(HDF5_C_COMPILER_NAMES h5pcc h5cc)
174 set(HDF5_CXX_COMPILER_NAMES h5pc++ h5c++)
175 set(HDF5_Fortran_COMPILER_NAMES h5pfc h5fc)
177 set(HDF5_C_COMPILER_NAMES h5cc h5pcc)
178 set(HDF5_CXX_COMPILER_NAMES h5c++ h5pc++)
179 set(HDF5_Fortran_COMPILER_NAMES h5fc h5pfc)
182 # We may have picked up some duplicates in various lists during the above 183 # process for the language bindings (both the C and C++ bindings depend on 184 # libz for example). Remove the duplicates. It appears that the default 185 # CMake behavior is to remove duplicates from the end of a list. However, 186 # for link lines, this is incorrect since unresolved symbols are searched 187 # for down the link line. Therefore, we reverse the list, remove the 188 # duplicates, and then reverse it again to get the duplicates removed from 192 list(REVERSE ${_list_name})
193 list(REMOVE_DUPLICATES ${_list_name})
194 list(REVERSE ${_list_name})
198 # Test first if the current compilers automatically wrap HDF5 200 set(scratch_directory
201 ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
203 NOT EXISTS ${scratch_directory}/compiler_has_h5_c)
204 set(test_file ${scratch_directory}/cmake_hdf5_test.c)
205 file(WRITE ${test_file}
206 "#include <hdf5.h>\n" 207 "#include <hdf5_hl.h>\n" 208 "const char* info_ver = \"INFO\" \":\" H5_VERSION;\n" 209 "#ifdef H5_HAVE_PARALLEL\n" 210 "const char* info_parallel = \"INFO\" \":\" \"PARALLEL\";\n" 212 "int main(int argc, char **argv) {\n" 213 " int require = 0;\n" 214 " require += info_ver[argc];\n" 215 "#ifdef H5_HAVE_PARALLEL\n" 216 " require += info_parallel[argc];\n" 219 " fid = H5Fcreate(\"foo.h5\",H5F_ACC_TRUNC,H5P_DEFAULT,H5P_DEFAULT);\n" 222 try_compile(${success} ${scratch_directory} ${test_file}
223 COPY_FILE ${scratch_directory}/compiler_has_h5_c
227 file(STRINGS ${scratch_directory}/compiler_has_h5_c INFO_STRINGS
230 string(REGEX MATCH
"^INFO:([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?" 231 INFO_VER
"${INFO_STRINGS}" 233 set(${
version} ${CMAKE_MATCH_1})
235 set(${
version} ${HDF5_C_VERSION}.${CMAKE_MATCH_3})
239 if(INFO_STRINGS MATCHES
"INFO:PARALLEL")
240 set(${is_parallel} TRUE PARENT_SCOPE)
242 set(${is_parallel} FALSE PARENT_SCOPE)
248 set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
250 NOT EXISTS ${scratch_directory}/compiler_has_h5_cxx)
251 set(test_file ${scratch_directory}/cmake_hdf5_test.cxx)
252 file(WRITE ${test_file}
253 "#include <H5Cpp.h>\n" 254 "#ifndef H5_NO_NAMESPACE\n" 255 "using namespace H5;\n" 257 "const char* info_ver = \"INFO\" \":\" H5_VERSION;\n" 258 "#ifdef H5_HAVE_PARALLEL\n" 259 "const char* info_parallel = \"INFO\" \":\" \"PARALLEL\";\n" 261 "int main(int argc, char **argv) {\n" 262 " int require = 0;\n" 263 " require += info_ver[argc];\n" 264 "#ifdef H5_HAVE_PARALLEL\n" 265 " require += info_parallel[argc];\n" 267 " H5File file(\"foo.h5\", H5F_ACC_TRUNC);\n" 270 try_compile(${success} ${scratch_directory} ${test_file}
271 COPY_FILE ${scratch_directory}/compiler_has_h5_cxx
275 file(STRINGS ${scratch_directory}/compiler_has_h5_cxx INFO_STRINGS
278 string(REGEX MATCH
"^INFO:([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?" 279 INFO_VER
"${INFO_STRINGS}" 281 set(${
version} ${CMAKE_MATCH_1})
283 set(${
version} ${HDF5_CXX_VERSION}.${CMAKE_MATCH_3})
287 if(INFO_STRINGS MATCHES
"INFO:PARALLEL")
288 set(${is_parallel} TRUE PARENT_SCOPE)
290 set(${is_parallel} FALSE PARENT_SCOPE)
297 set(scratch_directory
298 ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
299 set(test_file ${scratch_directory}/cmake_hdf5_test.f90)
300 file(WRITE ${test_file}
301 "program hdf5_hello\n" 306 " call h5open_f(error)\n" 307 " call h5close_f(error)\n" 309 try_compile(${success} ${scratch_directory} ${test_file})
311 execute_process(COMMAND ${CMAKE_Fortran_COMPILER} -showconfig
312 OUTPUT_VARIABLE config_output
313 ERROR_VARIABLE config_error
314 RESULT_VARIABLE config_result
316 if(config_output MATCHES
"Parallel HDF5: yes")
317 set(${is_parallel} TRUE PARENT_SCOPE)
319 set(${is_parallel} FALSE PARENT_SCOPE)
325 # Invoke the HDF5 wrapper compiler. The compiler return value is stored to the 326 # return_value argument, the text output is stored to the output variable. 329 if(HDF5_USE_STATIC_LIBRARIES)
330 set(lib_type_args -noshlib)
332 set(lib_type_args -shlib)
334 set(scratch_dir ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/hdf5)
335 if(
"${language}" STREQUAL
"C")
336 set(test_file ${scratch_dir}/cmake_hdf5_test.c)
337 elseif(
"${language}" STREQUAL
"CXX")
338 set(test_file ${scratch_dir}/cmake_hdf5_test.cxx)
339 elseif(
"${language}" STREQUAL
"Fortran")
340 set(test_file ${scratch_dir}/cmake_hdf5_test.f90)
342 exec_program( ${HDF5_${
language}_COMPILER_EXECUTABLE}
343 ARGS -show ${lib_type_args} ${test_file}
344 OUTPUT_VARIABLE ${output}
345 RETURN_VALUE ${return_value}
347 if(NOT ${${return_value}} EQUAL 0)
349 "Unable to determine HDF5 ${language} flags from HDF5 wrapper.")
351 exec_program( ${HDF5_${
language}_COMPILER_EXECUTABLE}
353 OUTPUT_VARIABLE config_output
354 RETURN_VALUE config_return
356 if(NOT ${return_value} EQUAL 0)
358 "Unable to determine HDF5 ${language} version from HDF5 wrapper.")
360 string(REGEX MATCH
"HDF5 Version: ([a-zA-Z0-9\\.\\-]*)" version_match
"${config_output}")
362 string(REPLACE
"HDF5 Version: " "" ${
version}
"${version_match}")
363 string(REPLACE
"-patch" "." ${
version}
"${${version}}")
365 if(config_output MATCHES
"Parallel HDF5: yes")
366 set(${is_parallel} TRUE)
368 set(${is_parallel} FALSE)
372 # Parse a compile line for definitions, includes, library paths, and libraries. 381 separate_arguments(_HDF5_COMPILE_ARGS NATIVE_COMMAND
"${${compile_line_var}}")
383 foreach(arg IN LISTS _HDF5_COMPILE_ARGS)
384 if(
"${arg}" MATCHES
"^-I(.*)$")
386 list(APPEND ${include_paths}
"${CMAKE_MATCH_1}")
387 elseif(
"${arg}" MATCHES
"^-D(.*)$")
389 list(APPEND ${definitions}
"-D${CMAKE_MATCH_1}")
390 elseif(
"${arg}" MATCHES
"^-L(.*)$")
391 # library search path 392 list(APPEND ${library_paths}
"${CMAKE_MATCH_1}")
393 elseif(
"${arg}" MATCHES
"^-l(hdf5.*hl.*)$")
395 list(APPEND ${libraries_hl}
"${CMAKE_MATCH_1}")
396 elseif(
"${arg}" MATCHES
"^-l(.*)$")
398 list(APPEND ${libraries}
"${CMAKE_MATCH_1}")
399 elseif(
"${arg}" MATCHES
"^(.:)?[/\\].*\\.(a|so|dylib|sl|lib)$")
401 if(NOT EXISTS
"${arg}")
404 get_filename_component(_HDF5_LPATH
"${arg}" DIRECTORY)
405 get_filename_component(_HDF5_LNAME
"${arg}" NAME_WE)
406 string(REGEX REPLACE
"^lib" "" _HDF5_LNAME
"${_HDF5_LNAME}")
407 list(APPEND ${library_paths}
"${_HDF5_LPATH}")
408 if(_HDF5_LNAME MATCHES
"hdf5.*hl")
409 list(APPEND ${libraries_hl}
"${_HDF5_LNAME}")
411 list(APPEND ${libraries}
"${_HDF5_LNAME}")
417 # Select a preferred imported configuration from a target 419 # We will first assign the value to a local variable _imported_conf, then assign
420 # it to the
function argument at the end.
421 get_target_property(_imported_conf ${
target} MAP_IMPORTED_CONFIG_${CMAKE_BUILD_TYPE})
422 if (NOT _imported_conf)
423 # Get available imported configurations by examining target properties 424 get_target_property(_imported_conf ${
target} IMPORTED_CONFIGURATIONS)
426 message(STATUS
"Found imported configurations: ${_imported_conf}")
428 # Find the imported configuration that we prefer. 429 # We do this by making list of configurations in order of preference, 430 # starting with ${CMAKE_BUILD_TYPE} and ending with the first imported_conf 431 set(_preferred_confs ${CMAKE_BUILD_TYPE})
432 list(GET _imported_conf 0 _fallback_conf)
433 list(APPEND _preferred_confs RELWITHDEBINFO RELEASE DEBUG ${_fallback_conf})
435 message(STATUS
"Start search through imported configurations in the following order: ${_preferred_confs}")
437 # Now find the first of these that is present in imported_conf 439 cmake_policy(SET CMP0057 NEW)
# support IN_LISTS 440 foreach (_conf IN LISTS _preferred_confs)
441 if (${_conf} IN_LIST _imported_conf)
442 set(_imported_conf ${_conf})
449 message(STATUS
"Selected imported configuration: ${_imported_conf}")
451 # assign value to function argument 452 set(${imported_conf} ${_imported_conf} PARENT_SCOPE)
457 set(HDF5_ROOT $ENV{HDF5_ROOT})
460 set(_HDF5_SEARCH_OPTS NO_DEFAULT_PATH)
462 set(_HDF5_SEARCH_OPTS)
465 # Try to find HDF5 using an installed hdf5-config.cmake 466 if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
467 find_package(HDF5 QUIET NO_MODULE
473 message(STATUS
"Found HDF5 at ${HDF5_DIR} via NO_MODULE. Now trying to extract locations etc.")
475 set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL})
476 set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIR})
478 if (NOT TARGET hdf5 AND NOT TARGET hdf5-
static AND NOT TARGET hdf5-shared)
479 # Some HDF5 versions (e.g. 1.8.18) used hdf5::hdf5 etc 480 set(_target_prefix
"hdf5::")
482 set(HDF5_C_TARGET ${_target_prefix}hdf5)
483 set(HDF5_C_HL_TARGET ${_target_prefix}hdf5_hl)
484 set(HDF5_CXX_TARGET ${_target_prefix}hdf5_cpp)
485 set(HDF5_CXX_HL_TARGET ${_target_prefix}hdf5_hl_cpp)
486 set(HDF5_Fortran_TARGET ${_target_prefix}hdf5_fortran)
487 set(HDF5_Fortran_HL_TARGET ${_target_prefix}hdf5_hl_fortran)
488 set(HDF5_DEFINITIONS
"")
489 if(HDF5_USE_STATIC_LIBRARIES)
490 set(_suffix
"-static")
492 set(_suffix
"-shared")
494 foreach(_lang ${HDF5_LANGUAGE_BINDINGS})
496 #Older versions of hdf5 don
't have a static/shared suffix so 497 #if we detect that occurrence clear the suffix 498 if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix}) 499 if(NOT TARGET ${HDF5_${_lang}_TARGET}) 500 #can't find
this component with or without the suffix
501 #so bail out, and let the following locate HDF5
502 set(HDF5_FOUND FALSE)
509 message(STATUS
"Trying to get properties of target ${HDF5_${_lang}_TARGET}${_suffix}")
511 # Find library for this target. Complicated as on Windows with a DLL, we need to search for the import-lib. 513 get_target_property(_hdf5_lang_location ${HDF5_${_lang}_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} )
514 if (NOT _hdf5_lang_location)
515 # no import lib, just try LOCATION 516 get_target_property(_hdf5_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION_${_hdf5_imported_conf})
517 if (NOT _hdf5_lang_location)
518 get_target_property(_hdf5_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
521 if( _hdf5_lang_location )
522 set(HDF5_${_lang}_LIBRARY ${_hdf5_lang_location})
523 list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
524 set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_TARGET}${_suffix})
525 set(HDF5_${_lang}_FOUND True)
528 get_target_property(__lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} IMPORTED_IMPLIB_${_hdf5_imported_conf} )
529 if (NOT _hdf5_lang_hl_location)
530 get_target_property(_hdf5_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION_${_hdf5_imported_conf})
531 if (NOT _hdf5_hl_lang_location)
532 get_target_property(_hdf5_hl_lang_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
535 if( _hdf5_lang_hl_location )
536 set(HDF5_${_lang}_HL_LIBRARY ${_hdf5_lang_hl_location})
537 list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_TARGET}${_suffix})
538 set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_HL_TARGET}${_suffix})
539 set(HDF5_HL_FOUND True)
541 unset(_hdf5_lang_hl_location)
543 unset(_hdf5_imported_conf)
544 unset(_hdf5_lang_location)
550 set(_HDF5_NEED_TO_SEARCH False)
551 set(HDF5_COMPILER_NO_INTERROGATE True)
552 # Only search for languages we've enabled 553 foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
554 # First check to see if our regular compiler is one of wrappers 555 if(__lang STREQUAL
"C")
557 HDF5_${__lang}_COMPILER_NO_INTERROGATE
558 HDF5_${__lang}_VERSION
559 HDF5_${__lang}_IS_PARALLEL)
560 elseif(__lang STREQUAL
"CXX")
562 HDF5_${__lang}_COMPILER_NO_INTERROGATE
563 HDF5_${__lang}_VERSION
564 HDF5_${__lang}_IS_PARALLEL)
565 elseif(__lang STREQUAL
"Fortran")
567 HDF5_${__lang}_COMPILER_NO_INTERROGATE
568 HDF5_${__lang}_IS_PARALLEL)
572 if(HDF5_${__lang}_COMPILER_NO_INTERROGATE)
573 message(STATUS
"HDF5: Using hdf5 compiler wrapper for all ${__lang} compiling")
574 set(HDF5_${__lang}_FOUND True)
575 set(HDF5_${__lang}_COMPILER_EXECUTABLE_NO_INTERROGATE
576 "${CMAKE_${__lang}_COMPILER}" 577 CACHE FILEPATH
"HDF5 ${__lang} compiler wrapper")
578 set(HDF5_${__lang}_DEFINITIONS)
579 set(HDF5_${__lang}_INCLUDE_DIRS)
580 set(HDF5_${__lang}_LIBRARIES)
581 set(HDF5_${__lang}_HL_LIBRARIES)
583 mark_as_advanced(HDF5_${__lang}_COMPILER_EXECUTABLE_NO_INTERROGATE)
585 set(HDF5_${__lang}_FOUND True)
586 set(HDF5_HL_FOUND True)
588 set(HDF5_COMPILER_NO_INTERROGATE False)
589 # If
this language isn
't using the wrapper, then try to seed the 590 # search options with the wrapper 591 find_program(HDF5_${__lang}_COMPILER_EXECUTABLE 592 NAMES ${HDF5_${__lang}_COMPILER_NAMES} NAMES_PER_DIR 594 PATH_SUFFIXES bin Bin 595 DOC "HDF5 ${__lang} Wrapper compiler. Used only to detect HDF5 compile flags." 598 mark_as_advanced( HDF5_${__lang}_COMPILER_EXECUTABLE ) 599 unset(HDF5_${__lang}_COMPILER_NAMES) 601 if(HDF5_${__lang}_COMPILER_EXECUTABLE) 602 _HDF5_invoke_compiler(${__lang} HDF5_${__lang}_COMPILE_LINE 603 HDF5_${__lang}_RETURN_VALUE HDF5_${__lang}_VERSION HDF5_${__lang}_IS_PARALLEL) 604 if(HDF5_${__lang}_RETURN_VALUE EQUAL 0) 605 message(STATUS "HDF5: Using hdf5 compiler wrapper to determine ${__lang} configuration") 606 _HDF5_parse_compile_line( HDF5_${__lang}_COMPILE_LINE 607 HDF5_${__lang}_INCLUDE_DIRS 608 HDF5_${__lang}_DEFINITIONS 609 HDF5_${__lang}_LIBRARY_DIRS 610 HDF5_${__lang}_LIBRARY_NAMES 611 HDF5_${__lang}_HL_LIBRARY_NAMES 613 set(HDF5_${__lang}_LIBRARIES) 615 foreach(L IN LISTS HDF5_${__lang}_LIBRARY_NAMES) 616 set(_HDF5_SEARCH_NAMES_LOCAL) 617 if("x${L}" MATCHES "hdf5") 619 set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS}) 620 if(HDF5_USE_STATIC_LIBRARIES) 622 set(_HDF5_SEARCH_NAMES_LOCAL lib${L}) 624 set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) 629 set(_HDF5_SEARCH_OPTS_LOCAL) 631 find_library(HDF5_${__lang}_LIBRARY_${L} 632 NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${L} NAMES_PER_DIR 633 HINTS ${HDF5_${__lang}_LIBRARY_DIRS} 635 ${_HDF5_SEARCH_OPTS_LOCAL} 637 unset(_HDF5_SEARCH_OPTS_LOCAL) 638 unset(_HDF5_SEARCH_NAMES_LOCAL) 639 if(HDF5_${__lang}_LIBRARY_${L}) 640 list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}}) 642 list(APPEND HDF5_${__lang}_LIBRARIES ${L}) 646 set(HDF5_${__lang}_HL_LIBRARIES) 647 foreach(L IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES) 648 set(_HDF5_SEARCH_NAMES_LOCAL) 649 if("x${L}" MATCHES "hdf5") 651 set(_HDF5_SEARCH_OPTS_LOCAL ${_HDF5_SEARCH_OPTS}) 652 if(HDF5_USE_STATIC_LIBRARIES) 654 set(_HDF5_SEARCH_NAMES_LOCAL lib${L}) 656 set(_HDF5_SEARCH_NAMES_LOCAL lib${L}.a) 661 set(_HDF5_SEARCH_OPTS_LOCAL) 663 find_library(HDF5_${__lang}_LIBRARY_${L} 664 NAMES ${_HDF5_SEARCH_NAMES_LOCAL} ${L} NAMES_PER_DIR 665 HINTS ${HDF5_${__lang}_LIBRARY_DIRS} 667 ${_HDF5_SEARCH_OPTS_LOCAL} 669 unset(_HDF5_SEARCH_OPTS_LOCAL) 670 unset(_HDF5_SEARCH_NAMES_LOCAL) 671 if(HDF5_${__lang}_LIBRARY_${L}) 672 list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${__lang}_LIBRARY_${L}}) 674 list(APPEND HDF5_${__lang}_HL_LIBRARIES ${L}) 677 set(HDF5_HL_FOUND True) 680 set(HDF5_${__lang}_FOUND True) 681 _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_DEFINITIONS) 682 _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_INCLUDE_DIRS) 683 _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_LIBRARIES) 684 _HDF5_remove_duplicates_from_beginning(HDF5_${__lang}_HL_LIBRARIES) 686 set(_HDF5_NEED_TO_SEARCH True) 689 set(_HDF5_NEED_TO_SEARCH True) 692 if(HDF5_${__lang}_VERSION) 694 set(HDF5_VERSION ${HDF5_${__lang}_VERSION}) 695 elseif(NOT HDF5_VERSION VERSION_EQUAL HDF5_${__lang}_VERSION) 696 message(WARNING "HDF5 Version found for language ${__lang}, ${HDF5_${__lang}_VERSION} is different than previously found version ${HDF5_VERSION}") 699 if(DEFINED HDF5_${__lang}_IS_PARALLEL) 700 if(NOT DEFINED HDF5_IS_PARALLEL) 701 set(HDF5_IS_PARALLEL ${HDF5_${__lang}_IS_PARALLEL}) 702 elseif(NOT HDF5_IS_PARALLEL AND HDF5_${__lang}_IS_PARALLEL) 703 message(WARNING "HDF5 found for language ${__lang} is parallel but previously found language is not parallel.") 704 elseif(HDF5_IS_PARALLEL AND NOT HDF5_${__lang}_IS_PARALLEL) 705 message(WARNING "HDF5 found for language ${__lang} is not parallel but previously found language is parallel.") 710 set(_HDF5_NEED_TO_SEARCH True) 713 if(NOT HDF5_FOUND AND HDF5_COMPILER_NO_INTERROGATE) 714 # No arguments necessary, all languages can use the compiler wrappers 716 set(HDF5_METHOD "Included by compiler wrappers") 717 set(HDF5_REQUIRED_VARS HDF5_METHOD) 718 elseif(NOT HDF5_FOUND AND NOT _HDF5_NEED_TO_SEARCH) 719 # Compiler wrappers aren't being used by the build but were found and used
720 # to determine necessary include and library flags
721 set(HDF5_INCLUDE_DIRS)
723 set(HDF5_HL_LIBRARIES)
724 foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
725 if(HDF5_${__lang}_FOUND)
726 if(NOT HDF5_${__lang}_COMPILER_NO_INTERROGATE)
727 list(APPEND HDF5_DEFINITIONS ${HDF5_${__lang}_DEFINITIONS})
728 list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIRS})
729 list(APPEND HDF5_LIBRARIES ${HDF5_${__lang}_LIBRARIES})
731 list(APPEND HDF5_HL_LIBRARIES ${HDF5_${__lang}_HL_LIBRARIES})
741 set(HDF5_REQUIRED_VARS HDF5_LIBRARIES)
743 list(APPEND HDF5_REQUIRED_VARS HDF5_HL_LIBRARIES)
747 find_program( HDF5_DIFF_EXECUTABLE
750 PATH_SUFFIXES bin Bin
752 DOC
"HDF5 file differencing tool." )
753 mark_as_advanced( HDF5_DIFF_EXECUTABLE )
756 # seed the initial lists of libraries to find with items we know we need 757 set(HDF5_C_LIBRARY_NAMES hdf5)
758 set(HDF5_C_HL_LIBRARY_NAMES hdf5_hl)
760 set(HDF5_CXX_LIBRARY_NAMES hdf5_cpp ${HDF5_C_LIBRARY_NAMES})
761 set(HDF5_CXX_HL_LIBRARY_NAMES hdf5_hl_cpp ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_CXX_LIBRARY_NAMES})
763 set(HDF5_Fortran_LIBRARY_NAMES hdf5_fortran ${HDF5_C_LIBRARY_NAMES})
764 set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5hl_fortran ${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES})
766 foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
767 # find the HDF5 include directories 768 if(
"${__lang}" STREQUAL
"Fortran")
769 set(HDF5_INCLUDE_FILENAME hdf5.mod)
770 elseif(
"${__lang}" STREQUAL
"CXX")
771 set(HDF5_INCLUDE_FILENAME H5Cpp.h)
773 set(HDF5_INCLUDE_FILENAME hdf5.h)
776 find_path(HDF5_${__lang}_INCLUDE_DIR ${HDF5_INCLUDE_FILENAME}
778 PATHS $ENV{HOME}/.local/include
779 PATH_SUFFIXES include Include
782 mark_as_advanced(HDF5_${__lang}_INCLUDE_DIR)
783 #
set the _DIRS variable as
this is what the user will normally use
784 set(HDF5_${__lang}_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIR})
785 list(APPEND HDF5_INCLUDE_DIRS ${HDF5_${__lang}_INCLUDE_DIR})
787 # find the HDF5 libraries
788 foreach(LIB IN LISTS HDF5_${__lang}_LIBRARY_NAMES)
789 if(HDF5_USE_STATIC_LIBRARIES)
790 # According to bug 1643 on the CMake bug tracker, this is the 791 # preferred method for searching for a static library. 792 # See https://gitlab.kitware.com/cmake/cmake/-/issues/1643. We search 793 # first for the full static library name, but fall back to a 794 # generic search on the name if the static search fails. 795 set( THIS_LIBRARY_SEARCH_DEBUG
796 lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug
797 lib${LIB}d-
static.a lib${LIB}_debug-
static.a ${LIB}d-
static ${LIB}_D-
static ${LIB}_debug-static )
798 set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a lib${LIB} lib${LIB}-
static.a ${LIB}-
static)
800 set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
801 set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
803 list(APPEND HDF5_DEFINITIONS
"-DH5_BUILT_AS_DYNAMIC_LIB")
806 find_library(HDF5_${LIB}_LIBRARY_DEBUG
807 NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
808 HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
811 find_library( HDF5_${LIB}_LIBRARY_RELEASE
812 NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
813 HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
816 select_library_configurations( HDF5_${LIB} )
817 list(APPEND HDF5_${__lang}_LIBRARIES ${HDF5_${LIB}_LIBRARY})
819 if(HDF5_${__lang}_LIBRARIES)
820 set(HDF5_${__lang}_FOUND True)
823 # Append the libraries for this language binding to the list of all 824 # required libraries. 825 list(APPEND HDF5_LIBRARIES ${HDF5_${__lang}_LIBRARIES})
828 foreach(LIB IN LISTS HDF5_${__lang}_HL_LIBRARY_NAMES)
829 if(HDF5_USE_STATIC_LIBRARIES)
830 # According to bug 1643 on the CMake bug tracker, this is the 831 # preferred method for searching for a static library. 832 # See https://gitlab.kitware.com/cmake/cmake/-/issues/1643. We search 833 # first for the full static library name, but fall back to a 834 # generic search on the name if the static search fails. 835 set( THIS_LIBRARY_SEARCH_DEBUG
836 lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug
837 lib${LIB}d-
static.a lib${LIB}_debug-
static.a lib${LIB}d-
static lib${LIB}_D-
static lib${LIB}_debug-static )
838 set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-
static.a lib${LIB}-
static)
840 set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
841 set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
843 find_library(HDF5_${LIB}_LIBRARY_DEBUG
844 NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
845 HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
848 find_library( HDF5_${LIB}_LIBRARY_RELEASE
849 NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
850 HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
853 select_library_configurations( HDF5_${LIB} )
854 list(APPEND HDF5_${__lang}_HL_LIBRARIES ${HDF5_${LIB}_LIBRARY})
857 # Append the libraries for this language binding to the list of all 858 # required libraries. 859 list(APPEND HDF5_HL_LIBRARIES ${HDF5_${__lang}_HL_LIBRARIES})
862 if(FIND_HL AND HDF5_HL_LIBRARIES)
863 set(HDF5_HL_FOUND True)
871 # If the HDF5 include directory was found, open H5pubconf.h to determine if 872 # HDF5 was compiled with parallel IO support 873 set( HDF5_IS_PARALLEL FALSE )
874 set( HDF5_VERSION
"" )
875 foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
876 foreach(_hdr
"${_dir}/H5pubconf.h" "${_dir}/H5pubconf-64.h" "${_dir}/H5pubconf-32.h")
877 if( EXISTS
"${_hdr}" )
878 file( STRINGS
"${_hdr}" 879 HDF5_HAVE_PARALLEL_DEFINE
880 REGEX
"HAVE_PARALLEL 1" )
881 if( HDF5_HAVE_PARALLEL_DEFINE )
882 set( HDF5_IS_PARALLEL TRUE )
884 unset(HDF5_HAVE_PARALLEL_DEFINE)
886 file( STRINGS
"${_hdr}" 888 REGEX
"^[ \t]*#[ \t]*define[ \t]+H5_VERSION[ \t]+" )
889 if(
"${HDF5_VERSION_DEFINE}" MATCHES
890 "H5_VERSION[ \t]+\"([0-9]+\\.[0-9]+\\.[0-9]+)(-patch([0-9]+))?\"" )
891 set( HDF5_VERSION
"${CMAKE_MATCH_1}" )
893 set( HDF5_VERSION ${HDF5_VERSION}.${CMAKE_MATCH_3})
896 unset(HDF5_VERSION_DEFINE)
900 set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
901 "HDF5 library compiled with parallel IO support" )
902 mark_as_advanced( HDF5_IS_PARALLEL )
904 set(HDF5_REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
906 list(APPEND HDF5_REQUIRED_VARS HDF5_HL_LIBRARIES)
910 # For backwards compatibility we set HDF5_INCLUDE_DIR to the value of 912 if( HDF5_INCLUDE_DIRS )
913 set( HDF5_INCLUDE_DIR
"${HDF5_INCLUDE_DIRS}" )
916 # If HDF5_REQUIRED_VARS is empty at this point, then it's likely that 917 # something external is trying to explicitly pass already found 919 if(NOT HDF5_REQUIRED_VARS)
920 set(HDF5_REQUIRED_VARS HDF5_LIBRARIES HDF5_INCLUDE_DIRS)
923 find_package_handle_standard_args(HDF5
924 REQUIRED_VARS ${HDF5_REQUIRED_VARS}
925 VERSION_VAR HDF5_VERSION
929 unset(_HDF5_SEARCH_OPTS)
931 if( HDF5_FOUND AND NOT HDF5_DIR)
932 # hide HDF5_DIR for the non-advanced user to avoid confusion with 933 # HDF5_DIR-NOT_FOUND while HDF5 was found. 934 mark_as_advanced(HDF5_DIR)
938 if (NOT TARGET HDF5::HDF5)
939 add_library(HDF5::HDF5 INTERFACE IMPORTED)
940 string(REPLACE
"-D" "" _hdf5_definitions
"${HDF5_DEFINITIONS}")
941 set_target_properties(HDF5::HDF5 PROPERTIES
942 INTERFACE_LINK_LIBRARIES
"${HDF5_LIBRARIES}" 943 INTERFACE_INCLUDE_DIRECTORIES
"${HDF5_INCLUDE_DIRS}" 944 INTERFACE_COMPILE_DEFINITIONS
"${_hdf5_definitions}")
945 unset(_hdf5_definitions)
948 include(vtkDetectLibraryType)
949 foreach (hdf5_lang IN LISTS HDF5_LANGUAGE_BINDINGS)
950 if (hdf5_lang STREQUAL
"C")
951 set(hdf5_target_name
"hdf5")
952 elseif (hdf5_lang STREQUAL
"CXX")
953 set(hdf5_target_name
"hdf5_cpp")
954 elseif (hdf5_lang STREQUAL
"Fortran")
955 set(hdf5_target_name
"hdf5_fortran")
960 if (NOT TARGET
"hdf5::${hdf5_target_name}")
961 if (HDF5_COMPILER_NO_INTERROGATE)
962 add_library(
"hdf5::${hdf5_target_name}" INTERFACE IMPORTED)
963 string(REPLACE
"-D" "" _hdf5_definitions
"${HDF5_${hdf5_lang}_DEFINITIONS}")
964 set_target_properties(
"hdf5::${hdf5_target_name}" PROPERTIES
965 INTERFACE_INCLUDE_DIRECTORIES
"${HDF5_${hdf5_lang}_INCLUDE_DIRS}" 966 INTERFACE_COMPILE_DEFINITIONS
"${_hdf5_definitions}")
968 if (DEFINED
"HDF5_${hdf5_target_name}_LIBRARY")
969 set(_hdf5_location
"${HDF5_${hdf5_target_name}_LIBRARY}")
970 elseif (DEFINED
"HDF5_${hdf5_lang}_LIBRARY")
971 set(_hdf5_location
"${HDF5_${hdf5_lang}_LIBRARY}")
972 elseif (DEFINED
"HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
973 set(_hdf5_location
"${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
975 # Error if we still don't have the location. 977 "HDF5 was found, but a different variable was set which contains " 981 add_library(
"hdf5::${hdf5_target_name}" "${_hdf5_libtype}" IMPORTED)
982 string(REPLACE
"-D" "" _hdf5_definitions
"${HDF5_${hdf5_lang}_DEFINITIONS}")
983 if (NOT HDF5_${hdf5_lang}_INCLUDE_DIRS)
984 set(HDF5_${hdf5_lang}_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
986 set_target_properties(
"hdf5::${hdf5_target_name}" PROPERTIES
987 IMPORTED_LOCATION
"${_hdf5_location}" 988 IMPORTED_IMPLIB
"${_hdf5_location}" 989 INTERFACE_INCLUDE_DIRECTORIES
"${HDF5_${hdf5_lang}_INCLUDE_DIRS}" 990 INTERFACE_COMPILE_DEFINITIONS
"${_hdf5_definitions}")
991 if (_hdf5_libtype STREQUAL
"SHARED")
992 set_property(TARGET
"hdf5::${hdf5_target_name}" APPEND
994 INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB)
995 elseif (_hdf5_libtype STREQUAL
"STATIC")
996 set_property(TARGET
"hdf5::${hdf5_target_name}" APPEND
998 INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_STATIC_LIB)
1000 unset(_hdf5_definitions)
1001 unset(_hdf5_libtype)
1002 unset(_hdf5_location)
1010 if (hdf5_lang STREQUAL
"C")
1011 set(hdf5_target_name
"hdf5_hl")
1012 elseif (hdf5_lang STREQUAL
"CXX")
1013 set(hdf5_target_name
"hdf5_hl_cpp")
1014 elseif (hdf5_lang STREQUAL
"Fortran")
1015 set(hdf5_target_name
"hdf5_hl_fortran")
1020 if (NOT TARGET
"hdf5::${hdf5_target_name}")
1021 if (HDF5_COMPILER_NO_INTERROGATE)
1022 add_library(
"hdf5::${hdf5_target_name}" INTERFACE IMPORTED)
1023 string(REPLACE
"-D" "" _hdf5_definitions
"${HDF5_${hdf5_lang}_HL_DEFINITIONS}")
1024 set_target_properties(
"hdf5::${hdf5_target_name}" PROPERTIES
1025 INTERFACE_INCLUDE_DIRECTORIES
"${HDF5_${hdf5_lang}_HL_INCLUDE_DIRS}" 1026 INTERFACE_COMPILE_DEFINITIONS
"${_hdf5_definitions}")
1028 if (DEFINED
"HDF5_${hdf5_target_name}_LIBRARY")
1029 set(_hdf5_location
"${HDF5_${hdf5_target_name}_LIBRARY}")
1030 elseif (DEFINED
"HDF5_${hdf5_lang}_HL_LIBRARY")
1031 set(_hdf5_location
"${HDF5_${hdf5_lang}_HL_LIBRARY}")
1032 elseif (DEFINED
"HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}")
1033 set(_hdf5_location
"${HDF5_${hdf5_lang}_LIBRARY_${hdf5_target_name}}")
1035 # Error if we still don't have the location. 1037 "HDF5 was found, but a different variable was set which contains " 1041 add_library(
"hdf5::${hdf5_target_name}" "${_hdf5_libtype}" IMPORTED)
1042 string(REPLACE
"-D" "" _hdf5_definitions
"${HDF5_${hdf5_lang}_HL_DEFINITIONS}")
1043 set_target_properties(
"hdf5::${hdf5_target_name}" PROPERTIES
1044 IMPORTED_LOCATION
"${_hdf5_location}" 1045 IMPORTED_IMPLIB
"${_hdf5_location}" 1046 INTERFACE_INCLUDE_DIRECTORIES
"${HDF5_${hdf5_lang}_HL_INCLUDE_DIRS}" 1047 INTERFACE_COMPILE_DEFINITIONS
"${_hdf5_definitions}")
1048 if (_hdf5_libtype STREQUAL
"SHARED")
1049 set_property(TARGET
"hdf5::${hdf5_target_name}" APPEND
1051 INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB)
1052 elseif (_hdf5_libtype STREQUAL
"STATIC")
1053 set_property(TARGET
"hdf5::${hdf5_target_name}" APPEND
1055 INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_STATIC_LIB)
1057 unset(_hdf5_definitions)
1058 unset(_hdf5_libtype)
1059 unset(_hdf5_location)
1065 if (HDF5_DIFF_EXECUTABLE AND NOT TARGET hdf5::h5diff)
1066 add_executable(hdf5::h5diff IMPORTED)
1067 set_target_properties(hdf5::h5diff PROPERTIES
1068 IMPORTED_LOCATION
"${HDF5_DIFF_EXECUTABLE}")
1072 if (HDF5_FIND_DEBUG)
1073 message(STATUS
"HDF5_DIR: ${HDF5_DIR}")
1074 message(STATUS
"HDF5_DEFINITIONS: ${HDF5_DEFINITIONS}")
1075 message(STATUS
"HDF5_INCLUDE_DIRS: ${HDF5_INCLUDE_DIRS}")
1076 message(STATUS
"HDF5_LIBRARIES: ${HDF5_LIBRARIES}")
1077 message(STATUS
"HDF5_HL_LIBRARIES: ${HDF5_HL_LIBRARIES}")
1078 foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
1079 message(STATUS
"HDF5_${__lang}_DEFINITIONS: ${HDF5_${__lang}_DEFINITIONS}")
1080 message(STATUS
"HDF5_${__lang}_INCLUDE_DIR: ${HDF5_${__lang}_INCLUDE_DIR}")
1081 message(STATUS
"HDF5_${__lang}_INCLUDE_DIRS: ${HDF5_${__lang}_INCLUDE_DIRS}")
1082 message(STATUS
"HDF5_${__lang}_LIBRARY: ${HDF5_${__lang}_LIBRARY}")
1083 message(STATUS
"HDF5_${__lang}_LIBRARIES: ${HDF5_${__lang}_LIBRARIES}")
1084 message(STATUS
"HDF5_${__lang}_HL_LIBRARY: ${HDF5_${__lang}_HL_LIBRARY}")
1085 message(STATUS
"HDF5_${__lang}_HL_LIBRARIES: ${HDF5_${__lang}_HL_LIBRARIES}")
boost::graph_traits< vtkGraph *>::vertex_descriptor target(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
function vtk_detect_library_type(output)
Detect library type of a library.
macro _HDF5_invoke_compiler(language, output, return_value, version, is_parallel)
function _HDF5_test_regular_compiler_C(success, version, is_parallel)
macro _HDF5_remove_duplicates_from_beginning(_list_name)
function _HDF5_test_regular_compiler_CXX(success, version, is_parallel)
function _HDF5_test_regular_compiler_Fortran(success, is_parallel)
function _HDF5_select_imported_config(target, imported_conf)
macro _HDF5_parse_compile_line()