summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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
|
* Help: Improve description of modulesBartosz Kosiorek2019-04-231-22/+23
|
* FindHDF5: Modernize formatting of variable documentationMichael Hirsch, Ph.D2019-02-071-49/+69
|
* FindHDF5: Use execute_process instead of exec_programMichael Hirsch, Ph.D2019-02-071-10/+12
|
* FindHDF5: Fix search for static hdf5_hl on WindowsMouginot B2018-12-061-1/+1
| | | | | | | The change in commit v3.10.0-rc1~411^2~1 (FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on Windows, 2017-07-03) accidentally left out a `lib` prefix on the static library name of `hdf5_hl`. It was done correctly already for the main `hdf5` library.
* Help: Convert remaining modules to block-style commentsKitware Robot2018-10-221-103/+104
|
* Merge topic 'FindHDF5-c-version'Brad King2017-11-091-1/+1
|\ | | | | | | | | | | | | a6abb6c8 FindHDF5: Fix H5_VERSION on Patch in C Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1465
| * FindHDF5: Fix H5_VERSION on Patch in CAxel Huebl2017-11-081-1/+1
| | | | | | | | | | | | | | | | Fix a typo from commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of compiler wrappers, 2016-04-04) that accidentally used the HDF5 C++ version (which could be empty) while detecting the C patch version. The detection failed for patch releases, such as `1.10.0-patch1` becoming `.1` instead of `1.10.0.1`.
* | Fix trivial typos in textluzpaz2017-11-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* FindHDF5: fixes for HL when using an imported configKris Thielemans2017-08-031-3/+9
| | | | | - some variables did not have the appropriate HL infix - some logic was not yet implemented for HL
* FindHDF5: unset some variablesKris Thielemans2017-08-031-12/+14
| | | | | prefixed some local variables with _hdf5 and unset them at the end (still more of these to do)
* FindHDF5: for a static imported config, use CONFIG-specific libraryKris Thielemans2017-08-031-1/+4
| | | | | first check the LOCATION_<CONFIG> propertiy to find the library, then LOCATION
* FindHDF5: fix hdf5-config case with more than one configurationKris Thielemans2017-08-031-3/+43
| | | | | | | | | | Select a configuration as the first of the following available: * MAP_IMPORTED_CONFIG_<CONFIG> * ${CMAKE_BUILD_TYPE}, RELWITHDEBINFO, RELEASE, DEBUG * First entry in IMPORTED_CONFIGURATIONS Fixes: #17039
* FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLsKris Thielemans2017-07-071-0/+4
| | | | | | When searching for shared libraries on Windows, add H5_BUILT_AS_DYNAMIC_LIB to HDF5_DEFINITIONS so that the header file knows how to dllimport the symbols.
* FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on WindowsKris Thielemans2017-07-071-15/+23
| | | | Also add the `_D` suffix for debug libraries.
* FindHDF5: Fix parallel detection when primary compiler is an HDF5 wrapperChuck Atkins2017-06-161-21/+27
| | | | | | | | | | | This is covering a different use case where your primary compilers are HDF5 wrappers, as is the case when using the Cray Programming Environment. The existing code tries to query the compiler using options only available to h5cc and friends, which doesn't work when your wrapper is not h5cc, as is the case with the CrayPE. This change instead pulls strings out of a test binary when testing for "is your regular compiler an HDF5 wrapper" while the "query wrapper for options" is reserved for the "I found the hdf5 wrappers but they're not your main compiler" mode.
* separgs: Use NATIVE_COMMAND where appropriateChristian Pfeiffer2017-04-261-5/+1
|
* Merge branch 'backport-FindHDF5-optional-no-config' into ↵Brad King2017-03-211-1/+4
|\ | | | | | | FindHDF5-optional-no-config
| * FindHDF5: Add option to skip finding package configuration fileBrad King2017-03-211-1/+4
| | | | | | | | | | | | | | | | Some projects may not be prepared to use the imported targets defined by the HDF5 package configuration file. Give users a way to skip this part of the search. Issue: #16718
| * FindHDF5: Improve HDF5_ROOT variable documentationBrad King2017-03-211-1/+2
| |
* | FindHDF5: Improve HDF5_ROOT and HDF5_FIND_DEBUG documentationBrad King2017-03-211-2/+4
| |
* | Merge topic 'FindHDF5-fix-quoting'Brad King2017-03-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | 8214061d FindHDF5: fix quoting Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !587
| * | FindHDF5: fix quotingBen Boeckel2017-03-151-1/+1
| | |
* | | FindHDF5: set HDF5_<lang>_INCLUDE_DIRS in all casesKris Thielemans2017-03-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case that we're using `find_path` to find the include directory, only the `_DIR` variable was set, while in all other cases only the `_DIRS` variable was set. Set the `_DIRS` variable in all cases (while keeping `_DIR` as result of `find_path`). Also document the `_DIRS` variable. Fixes: #16694
* | | Merge topic 'FindHDF5-fix-definitions'Brad King2017-03-061-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | ea2a8dd2 FindHDF5: Restore `-D` in HDF5_DEFINITIONS Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !554
| * | FindHDF5: Restore `-D` in HDF5_DEFINITIONSKris Thielemans2017-03-061-1/+1
| |/ | | | | | | | | | | | | | | Changes in commit v3.8.0-rc1~7^2~5 (FindHDF5: Fix command-line parsing argument extraction order, 2017-02-02) accidentally dropped `-D` from preprocessor definition flags extracted from the HDF5 compiler wrappers. Fixes: #16693
* | FindHDF5: initialize HDF5_DEFINITIONS when using hdf5-config.cmakeKris Thielemans2017-03-011-0/+1
| |
* | FindHDF5: document HDF5_<LANG>_DEFINITIONSKris Thielemans2017-03-011-1/+5
| |
* | FindHDF5: use import libraries when using hdf5-config.cmake on WindowsKris Thielemans2017-03-011-3/+11
| | | | | | | | | | | | | | The `LOCATION` of imported shared libraries on Windows is that of the `.dll`. Use the import library instead to get the `.lib` to be linked. Fixes: #16534
* | FindHDF5: do not cache library locations when using hdf5-config.cmakeKris Thielemans2017-03-011-6/+2
| | | | | | | | | | The imported targets provide a persistent reference of their location, so we do not need to cache the values.
* | FindHDF5: recognize hdf5:: prefix when using hdf5-config.cmakeKris Thielemans2017-03-011-6/+10
| | | | | | | | Some versions of HDF5 use this prefix on their imported targets.
* | FindHDF5: fix typo in commentKris Thielemans2017-03-011-1/+1
| |
* | FindHDF5: remove mark_as_advanced for non-cached variablesKris Thielemans2017-03-011-7/+0
| |
* | FindHDF5: add HDF5_FIND_DEBUG variable to get debugging outputKris Thielemans2017-02-281-0/+23
| |
* | FindHDF5: hide HDF5_DIR if HDF5 was found in another wayKris Thielemans2017-02-281-0/+6
|/
* FindHDF5: Fix search for language-specific header fileBrad King2017-02-171-2/+2
| | | | | | | | | | | | | | | | | | Refactoring in commit v3.6.0-rc1~85^2 (HDF5: Refactor the use of compiler wrappers, 2016-04-04) converted code of the form if(${LANGUAGE} MATCHES ...) to if(LANGUAGE MATCHES ...) However, `LANGUAGE` is a foreach() loop variable and not a normal variable so auto-dereference does not occur. Restore the explicit `${}` syntax and use the new name of the loop variable that has changed since then too. Fixes: #16651
* FindHDF5: Restore HDF5_<LANG>_INCLUDE_DIR advanced cache entry markBrad King2017-02-171-1/+1
| | | | | | | | | Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching to correctly find HL for all bindings, 2016-05-12) renamed the language loop variable used to construct the name of `HDF5_<LANG>_INCLUDE_DIR` but forgot to update it in the `mark_as_advanced` call. Fix it now. Issue: #16651
* FindHDF5: Restore HDF5_INCLUDE_DIR in all code pathsBrad King2017-02-031-5/+6
| | | | | | | | | This compatibility variable should be set no matter which method was used to find HDF5. Even if `HDF5_INCLUDE_DIRS` was set by copying the `HDF5_INCLUDE_DIR` value from `hdf5-config.cmake` it will not hurt to copy the same value back. Issue: #16566
* FindHDF5: Restore fallback to static librariesBrad King2017-02-031-11/+12
| | | | | | | | | | | Since commit v3.6.1~6^2~2 (FindHDF5: Fix h5cc arg parsing to work with homebrew on Mac, 2016-07-11) we treated `HDF5_USE_STATIC_LIBRARIES` OFF as a requirement for shared libraries. It is just supposed to be a preference. Even if `HDF5_USE_STATIC_LIBRARIES` is not set we should still fall back to finding static libraries if shared libraries are not available. Issue: #16566
* FindHDF5: Fix search with HDF5_ROOTBrad King2017-02-031-8/+33
| | | | | | | | | | | | | | | Refactoring in commit v3.6.0-rc1~72^2 (HDF5: Rework component searching to correctly find HL for all bindings, 2016-05-12) turned off a large amount of its logic when HDF5_ROOT is set. This caused use of the hdf5 compiler wrapper to extract all needed libraries (e.g. z, dl as dependencies of hdf5 static libraries) to be skipped when using HDF5_ROOT. Fix the search logic to honor HDF5_ROOT in all code paths. Restrict the search for hdf5-specific components to this root, but allow external libraries to be found anywhere. Fixes: #16566
* FindHDF5: Use keywords in find_library callsBrad King2017-02-031-2/+8
| | | | Clarify the purpose of each argument.
* FindHDF5: Initialize/finalize internal search options variableBrad King2017-02-031-7/+11
| | | | While at it, use a more private name.