summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
Commit message (Collapse)AuthorAgeFilesLines
* FindHDF5: Record compiler wrapper checks to configure logBrad King2023-03-291-9/+21
|
* FindHDF5: Fix compiler wrapper checks with spaces in pathBrad King2023-03-291-10/+10
| | | | | | Some HDF5 compiler wrappers do not support source file paths that contain spaces. Pass source files to them using a file name in the current working directory to avoid spaces.
* Merge topic 'FindHDF5-CXX-without-C'Brad King2023-03-231-38/+28
|\ | | | | | | | | | | | | | | a6bb4975ab FindHDF5: Restore parallel HDF5 detection with only CXX enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8355
| * FindHDF5: Restore parallel HDF5 detection with only CXX enabledBrad King2023-03-221-38/+28
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 14c46fb16a (FindHDF5: Find C component with only CXX compiler, 2022-12-13, v3.26.0-rc1~175^2), if CXX is enabled but C is not, the `_HDF5_test_regular_compiler_C` helper writes a `.cpp` source but the `_HDF5_invoke_compiler` still expects a `.c` source. Refactor the logic to select a name for the source file up front, and use it in both helpers. Fixes: #24627 Issue: #24241
* | FindHDF5: Fix detection of Parallel HDF5Weiqun Zhang2023-02-211-4/+16
|/ | | | | | | | To detect Parallel HDF5, the output of `h5pcc -showconfig` was compared with `Parallel HDF5: yes`. However, the Boolean flag is not always `yes` or `no`, because it was set by the value in `HDF5_ENABLE_PARALLEL` if CMake was used for the configuration. This commit instead checks to see if the value is interpreted by CMake as "true".
* FindHDF5: Find C component with only CXX compilerChristoph Junghans2022-12-141-0/+4
| | | | | | | For CXX-only projects it is sometimes useful to detect the C component even with just a CXX compiler. Fixes: #24241
* Modules: Use new keyword-dispatched try_compile signatureMatthew Woehlke2022-09-141-3/+3
| | | | | | | | | | | Modify most of the modules that ship with CMake to use the new try_compile / try_run signatures added by commit aa9220d3a0 (try_compile: Add keyword-dispatched signature, 2022-09-02). This improves debugging by each invocation using its own directory so that the results of multiple invocations can be retained. This does not cover any invocations which provide an entire project, as that flavor of try_compile has not yet been updated.
* FindHDF5: Revert "Add explicit library location instead of guessed ..."Brad King2022-06-271-4/+4
| | | | | | | | | | | | | Revert commit e4e309f165 (FindHDF5: Add explicit library location instead of guessed library name., 2022-03-22, v3.24.0-rc1~375^2). The old behavior was not a guessed library name, but the name of an imported target that can contain per-config locations and encode usage requirements. Although find modules do not normally return their imported target names in the `_LIBRARIES` variable, FindHDF5 has done so since commit 5201a3065b (FindHDF5: use the target rather than the path, 2017-01-04, v3.8.0-rc1~81^2). Fixes: #23667
* FindHDF5: Add explicit library location instead of guessed library name.مهدي شينون (Mehdi Chinoune)2022-03-221-4/+4
|
* FindHDF5: Tolerate failure during compiler interrogationAxel Huebl2022-02-151-2/+2
| | | | | | | | | Check that the file that is accessed via `file(STRINGS...)` truly exists. This is not the case in some EMSCRIPTEN/WebASM builds where we want to overwrite the HDF5 find logic manually. The missing check here prevents that one can overwrite the search logic in exotic environments.
* FindHDF5: Set config-specific locations for imported targetsBrad King2022-01-311-2/+42
| | | | | | | | Update the imported target locations added by commit a8e0a6b3e4 (FindHDF5: Port changes from VTK, 2020-06-10, v3.19.0-rc1~312^2~1) to use config-specific locations. Issue: #21637
* FindHDF5: Drop IMPORTED_IMPLIB property from imported UNKNOWN librariesBrad King2022-01-311-2/+0
| | | | | | | | The imported targets added by commit a8e0a6b3e4 (FindHDF5: Port changes from VTK, 2020-06-10, v3.19.0-rc1~312^2~1) to use config-specific locations set the `IMPORTED_IMPLIB` target property. That property has no meaning for an imported library with type `UNKNOWN`. Drop it to avoid confusion.
* FindHDF5: Fix Fortran compiler interrogation without HL libraryHåkon Strandenes2021-11-171-2/+0
| | | | | | | | | | | | | When the HDF5 HL library is not available, FindHDF5 with Fortran does not work. The problem is because `cmake_hdf5_test.f90` tries to "use h5lt" and "use h5ds", which comes from the HL library. Then the basic compiler check fails completely. The two "use" lines were added by commit 00405af0f1 (HDF5: Refactor the use of compiler wrappers, 2016-04-04, v3.6.0-rc1~85^2) along with the rest of the check. Remove them. Fixes: #22890
* Merge topic 'FindHDF5-avoid-duplicate-library-entries'Brad King2021-11-041-0/+8
|\ | | | | | | | | | | | | | | 247f1149e1 FindHDF5: clear language-specific libraries list before discovery f56963cf05 FindHDF5: clear library output variables at the top of the module Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6698
| * FindHDF5: clear language-specific libraries list before discoveryBen Boeckel2021-11-031-0/+6
| |
| * FindHDF5: clear library output variables at the top of the moduleBen Boeckel2021-11-031-0/+2
| | | | | | | | | | This avoids accumulation of `HDF5_LIBRARIES` results when calling `find_package(HDF5)` multiple times within a single scope.
* | Merge topic 'FindHDF5-fix-windows-hl-implib-query'Brad King2021-11-041-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 6f830c5c38 FindHDF5: fix variable name when querying `hdf5_hl`'s implib Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6697
| * | FindHDF5: fix variable name when querying `hdf5_hl`'s implibBen Boeckel2021-11-031-1/+1
| |/ | | | | | | Introduced in 4150048a3b (FindHDF5: unset some variables, 2017-07-24).
* | LCC: Add dedicated support for MCST LCC compilermakise-homura2021-10-151-1/+1
|/ | | | | | | | | | | | | | | | | | | | | Divert LCC compiler as a new one, instead of treating it as GNU. Since old times, Elbrus C/C++/Fortran Compiler (LCC) by MCST has been passing checks for GNU compilers, so it has been identified as GNU. Now, with intent of seriously upstreaming its support, it has been added as a separate LCC compiler, and its version displays not a supported GCC version, but LCC version itself (e.g. LCC 1.25.19 instead of GNU 7.3.0). This commit adds its support for detection, and also converts basically every check like 'is this compiler GNU?' to 'is this compiler GNU or LCC?'. The only places where this check is untouched, is where it regards other platforms where LCC is unavailable (primarily non-Linux), and where it REALLY differs from GNU compiler. Note: this transition may break software that are already ported to Elbrus, but hardly relies that LCC will be detected as GNU; still such software is not known.
* FindHDF5: add compiler-specific module search pathsBen Boeckel2021-04-061-2/+17
|
* FindHDF5: track the "main" library for each languageBen Boeckel2021-04-061-0/+14
| | | | This will be used to build up additional include paths to search.
* FindHDF5: find include directories after the libraryBen Boeckel2021-04-061-20/+20
| | | | | Some include paths might depend on the library location (primarily for Fortran).
* FindHDF5: search for the new Fortran HL library nameBen Boeckel2021-04-051-1/+1
| | | | | | | HDF5 1.10.6 renamed this library to match the other language binding library names. Fixes: #20205
* Merge topic 'FindHDF5-silence-output'Brad King2021-01-211-3/+5
|\ | | | | | | | | | | | | | | b924669385 FindHDF5: silence STATUS messages when found with QUIET 2439a048b0 FindHDF5: avoid writing to the output when testing h5cc Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5722
| * FindHDF5: silence STATUS messages when found with QUIETBen Boeckel2021-01-201-3/+3
| |
| * FindHDF5: avoid writing to the output when testing h5ccBen Boeckel2021-01-201-0/+2
| | | | | | | | | | | | The execution of this tool can output error logs to the output during configure. This can then be caught by CTest and flagged as an error during the build.
* | Merge topic 'FindHDF5-no-dedup-keywords'Brad King2021-01-151-28/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | a5fe1712b2 FindHDF5: Remove unnecessary de-duplication of HDF5_LIBRARIES and friends dadb13f546 FindHDF5: Simplify preprocessor setting de-duplication Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5692
| * | FindHDF5: Remove unnecessary de-duplication of HDF5_LIBRARIES and friendsKris Thielemans2021-01-121-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | * When both debug and optimized libraries are found, the corresponding keywords were getting de-duplicated and breaking. * CMake's link line generation de-duplicates in many cases anyway. * Other find modules do not explicitly de-duplicate in general. Fixes: #21670
| * | FindHDF5: Simplify preprocessor setting de-duplicationBrad King2021-01-121-6/+6
| | | | | | | | | | | | | | | | | | Use `list(REMOVE_DUPLICATES)` directly. For definitions the order doesn't matter. For include directories it is better to remove late duplicates than early duplicates.
* | | FindHDF5: List imported targets in debug outputKris Thielemans2021-01-111-0/+15
| | | | | | | | | | | | | | | If HDF5_FIND_DEBUG, list all targets that are defined (from either FindHDF5.cmake or the hdf5-config.cmake).
* | | FindHDF5: correct and describe list of imported targetKris Thielemans2021-01-111-9/+16
|/ /
* | Merge topic 'FindHDF5-dbg-and-rel'Brad King2021-01-061-1/+1
|\ \ | |/ | | | | | | | | | | 5267ba9d63 FindHDF5: Fix finding both debug and release libs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5653
| * FindHDF5: Fix finding both debug and release libsKris Thielemans2021-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | Use `target_link_libraries` to set `INTERFACE_LINK_LIBRARIES` so that the `debug` and `optimized` keywords work. In commit a8e0a6b3e4 (FindHDF5: Port changes from VTK, 2020-06-10, v3.19.0-rc1~312^2~1) we added use of `HDF5_LIBRARIES`, but the value may contain `debug` and `optimized` keywords. Fixes: #21637
* | Merge topic 'versionadded'Brad King2020-12-031-1/+11
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | 5000f93a91 Help: Fix grammar in `.. versionadded` directives 8fea95319b Help: Add `.. versionadded` directives to module docs 8634561dca Help: Improve formatting for FindBoost and FindCUDA ea59b0cd34 Help: Fix version note for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE 05c3060b10 Help: Fix cmake_parse_arguments version note dafcef8b50 Help: Improve styling for versionadded/deprecated directives 6ae216daef Tests: Make RunCMake.CMP0106 expected output robust to line number changes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5560
| * Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-1/+11
| | | | | | | | Issue: #19715
* | FindHDF5: support the hdf5hl_fortran-based variable namesBen Boeckel2020-12-011-0/+4
| | | | | | | | Fixes: #21537
* | FindHDF5: improve error messages when a location variable isn't knownBen Boeckel2020-12-011-2/+2
|/
* FindHDF5: Remove VTK library type detectionSeth R Johnson2020-08-141-5/+2
|
* FindHDF5: Port changes from VTKBen Boeckel2020-08-141-2/+152
|
* Merge topic 'findhdf5-fix-nohl'Brad King2020-08-111-1/+0
|\ | | | | | | | | | | | | e038107ee7 FindHDF5: fix compiler detection when HL is disabled Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5112
| * FindHDF5: fix compiler detection when HL is disabledSeth R Johnson2020-08-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A valid HDF5 installation with the "high level" extensions not configured will *fail* to be correctly detected by CMake since commit d9e39f3f89 (FindHDF5: check that compiler wrapper can compile a minimal program, 2020-02-10, v3.18.0-rc1~744^2~1): ``` /.../hdf5/cmake_hdf5_test.c:2:10: fatal error: 'hdf5_hl.h' file not found ``` This does not stop the configuration but does prevent flags and libraries from being recognized.
* | FindHDF5: use CMakeFiles for temporary filesSeth R Johnson2020-06-111-2/+2
|/
* Update links to gitlab.kitware.com repos to add `-/`Brad King2020-05-261-2/+2
| | | | | | GitLab now uses a `/-/` component between the `group/project` part of the URL and the `{issues,merge_requests,tree}` part so that it can support `group/subgroup/project` with arbitrary depth.
* FindHDF5: Clean variables and outputSeth R Johnson2020-05-181-232/+244
| | | | | | | | | | | | The module's functionality is preserved. Perform cleanups: - Format some functions - Change macros to functions - Fix return value check from execute_process - Hide status messages unless HDF5_FIND_DEBUG is enabled - Normalize TRUE/FALSE capitalization Fixes: #20718
* Merge topic 'FindHDF5-docs'Brad King2020-02-121-10/+8
|\ | | | | | | | | | | | | 88cffab75f FindHDF5: docs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4343
| * FindHDF5: docsMichael Hirsch, Ph.D2020-02-111-10/+8
| | | | | | | | | | The docs referred to deprecated variables and HDF5_ROOT, which is implicit for every Find*.
* | FindHDF5: Improve search when not using HDF5 compiler wrapperMichael Hirsch, Ph.D2020-02-111-7/+20
| | | | | | | | Add common lib/inc path_suffixes.
* | FindHDF5: check that compiler wrapper can compile a minimal programMichael Hirsch, Ph.D2020-02-111-24/+35
|/ | | | | There are common setups where the compiler wrapper is broken and will give non-useful flags to CMake.
* FindHDF5: Append hdf5 to hdf5_hl to avoid undefined referencesWillem Deconinck2019-10-151-1/+1
|
* FindHDF5: Cray HDF5 Fortran module filename is usually capitalizedWillem Deconinck2019-10-151-1/+1
|