Commit Graph

131 Commits

Author SHA1 Message Date
Brad King
89430f4604 Merge topic 'FindHDF5-silence-output'
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
2021-01-21 09:17:39 -05:00
Ben Boeckel
b924669385 FindHDF5: silence STATUS messages when found with QUIET 2021-01-20 14:05:14 -05:00
Ben Boeckel
2439a048b0 FindHDF5: avoid writing to the output when testing h5cc
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.
2021-01-20 14:04:25 -05:00
Brad King
b9b5d49284 Merge topic 'FindHDF5-no-dedup-keywords'
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
2021-01-15 10:29:36 -05:00
Kris Thielemans
a5fe1712b2 FindHDF5: Remove unnecessary de-duplication of HDF5_LIBRARIES and friends
* 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
2021-01-12 16:26:59 -05:00
Brad King
dadb13f546 FindHDF5: Simplify preprocessor setting de-duplication
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.
2021-01-12 16:24:25 -05:00
Kris Thielemans
eec3b775a7 FindHDF5: List imported targets in debug output
If HDF5_FIND_DEBUG, list all targets that are defined
(from either FindHDF5.cmake or the hdf5-config.cmake).
2021-01-11 12:00:38 -05:00
Kris Thielemans
186b0f8131 FindHDF5: correct and describe list of imported target 2021-01-11 12:00:14 -05:00
Brad King
3734a96d98 Merge topic 'FindHDF5-dbg-and-rel'
5267ba9d63 FindHDF5: Fix finding both debug and release libs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5653
2021-01-06 14:08:27 -05:00
Kris Thielemans
5267ba9d63 FindHDF5: Fix finding both debug and release libs
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
2021-01-04 14:26:38 -05:00
Brad King
0eead931a3 Merge topic 'versionadded'
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
2020-12-03 08:49:25 -05:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Ben Boeckel
175beadd4c FindHDF5: support the hdf5hl_fortran-based variable names
Fixes: #21537
2020-12-01 15:31:47 -05:00
Ben Boeckel
adf108441e FindHDF5: improve error messages when a location variable isn't known 2020-12-01 15:31:21 -05:00
Seth R Johnson
5eff274017 FindHDF5: Remove VTK library type detection 2020-08-14 12:03:21 -04:00
Ben Boeckel
a8e0a6b3e4 FindHDF5: Port changes from VTK 2020-08-14 11:57:59 -04:00
Brad King
b995e2db38 Merge topic 'findhdf5-fix-nohl'
e038107ee7 FindHDF5: fix compiler detection when HL is disabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5112
2020-08-11 08:55:46 -04:00
Seth R Johnson
e038107ee7 FindHDF5: fix compiler detection when HL is disabled
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.
2020-08-10 11:53:58 -04:00
Seth R Johnson
931492bd6f FindHDF5: use CMakeFiles for temporary files 2020-06-11 13:47:47 -04:00
Brad King
eb705b9531 Update links to gitlab.kitware.com repos to add -/
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.
2020-05-26 11:38:01 -04:00
Seth R Johnson
8fa58aea77 FindHDF5: Clean variables and output
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
2020-05-18 12:40:01 -04:00
Brad King
506ffedf6c Merge topic 'FindHDF5-docs'
88cffab75f FindHDF5: docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4343
2020-02-12 09:20:59 -05:00
Michael Hirsch, Ph.D
88cffab75f FindHDF5: docs
The docs referred to deprecated variables and HDF5_ROOT, which is
implicit for every Find*.
2020-02-11 11:11:42 -05:00
Michael Hirsch, Ph.D
659e46b99b FindHDF5: Improve search when not using HDF5 compiler wrapper
Add common lib/inc path_suffixes.
2020-02-11 10:42:41 -05:00
Michael Hirsch, Ph.D
d9e39f3f89 FindHDF5: check that compiler wrapper can compile a minimal program
There are common setups where the compiler wrapper is broken and will
give non-useful flags to CMake.
2020-02-11 10:42:41 -05:00
Willem Deconinck
08f4b5dcf9 FindHDF5: Append hdf5 to hdf5_hl to avoid undefined references 2019-10-15 09:47:58 -04:00
Willem Deconinck
cd6f0ef35a FindHDF5: Cray HDF5 Fortran module filename is usually capitalized 2019-10-15 09:47:58 -04:00
Bartosz Kosiorek
cb811d11ce Help: Improve description of modules 2019-04-23 10:39:34 +02:00
Michael Hirsch, Ph.D
d3d9e6b760 FindHDF5: Modernize formatting of variable documentation 2019-02-07 06:47:07 -05:00
Michael Hirsch, Ph.D
acbd69c219 FindHDF5: Use execute_process instead of exec_program 2019-02-07 06:47:07 -05:00
Mouginot B
4e174e0960 FindHDF5: Fix search for static hdf5_hl on Windows
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.
2018-12-06 10:43:29 -05:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Brad King
a16930167d Merge topic 'FindHDF5-c-version'
a6abb6c8 FindHDF5: Fix H5_VERSION on Patch in C

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1465
2017-11-09 08:30:19 -05:00
Axel Huebl
a6abb6c8b6 FindHDF5: Fix H5_VERSION on Patch in C
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`.
2017-11-08 09:35:45 -05:00
luzpaz
777e87ae00 Fix trivial typos in text
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
2017-11-03 10:25:05 -04:00
Kris Thielemans
4956fc26b5 FindHDF5: fixes for HL when using an imported config
- some variables did not have the appropriate HL infix
- some logic was not yet implemented for HL
2017-08-03 09:49:47 -04:00
Kris Thielemans
4150048a3b FindHDF5: unset some variables
prefixed some local variables with _hdf5 and unset them at the end
(still more of these to do)
2017-08-03 09:49:47 -04:00
Kris Thielemans
9310d00822 FindHDF5: for a static imported config, use CONFIG-specific library
first check the LOCATION_<CONFIG> propertiy to find the library, then
LOCATION
2017-08-03 09:49:47 -04:00
Kris Thielemans
fc9828448d FindHDF5: fix hdf5-config case with more than one configuration
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
2017-08-03 09:48:19 -04:00
Kris Thielemans
6848ff4ce5 FindHDF5: Define H5_BUILT_AS_DYNAMIC_LIB when using Windows DLLs
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.
2017-07-07 08:58:57 -04:00
Kris Thielemans
6f131f49ee FindHDF5: Add support for HDF5_USE_STATIC_LIBRARIES on Windows
Also add the `_D` suffix for debug libraries.
2017-07-07 08:58:37 -04:00
Chuck Atkins
8b9d8c4ddc FindHDF5: Fix parallel detection when primary compiler is an HDF5 wrapper
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.
2017-06-16 11:40:02 -04:00
Christian Pfeiffer
28d8383797 separgs: Use NATIVE_COMMAND where appropriate 2017-04-26 20:34:23 +02:00
Brad King
2c55c143c8 Merge branch 'backport-FindHDF5-optional-no-config' into FindHDF5-optional-no-config 2017-03-21 13:12:16 -04:00
Brad King
63c0ba5ff1 FindHDF5: Improve HDF5_ROOT and HDF5_FIND_DEBUG documentation 2017-03-21 13:11:36 -04:00
Brad King
9753d4c27e FindHDF5: Add option to skip finding package configuration file
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
2017-03-21 13:07:07 -04:00
Brad King
2df8aa0c80 FindHDF5: Improve HDF5_ROOT variable documentation 2017-03-21 13:02:36 -04:00
Brad King
0e8b83a1b7 Merge topic 'FindHDF5-fix-quoting'
8214061d FindHDF5: fix quoting

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !587
2017-03-21 09:58:18 -04:00
Ben Boeckel
8214061d1a FindHDF5: fix quoting 2017-03-15 12:54:19 -04:00
Kris Thielemans
c6bef559f3 FindHDF5: set HDF5_<lang>_INCLUDE_DIRS in all cases
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
2017-03-06 13:09:49 -05:00