Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,187
    • Issues 3,187
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • CMake
  • CMakeCMake
  • Merge Requests
  • !4345

Merged
Opened Feb 10, 2020 by Michael Hirsch, Ph.D.@scivisionContributor

FindHDF5: check that compiler wrapper is functional before using flags

  • Overview 7
  • Commits 2
  • Pipelines 5
  • Changes 1

A common use case where the current FindHDF5.cmake gets led astray is Miniconda / Anaconda Python being used in a CMake project. The conda hdf5 compiler wrapper is first on PATH, but the conda compiler may not be installed.

This commit:

  1. checks that the compiler wrapper can compile a minimal HDF5 program before using what would be "wrong" info for a broken/missing compiler
  2. adds typical paths seen on Linux and MSYS2

In short, for Ubuntu and MSYS2 at least, FindHDF5 before this MR relied almost entirely on the compiler wrapper. In the systems I see, there are too many broken HDF5 compiler wrappers and so this MR strengthens the FindHDF5 algorithm.

Typical HDF5 1.10 library paths

  • MacOS Homebrew: lib/ | include/
  • Ubuntu 18.04: <system_libdir>/hdf5/serial | <system_incdir>/hdf5/serial/
  • MSYS2: <system_libdir> | <system_incdir>/{static,shared}/
  • Windows native: <install_dir>/lib | <install_dir>/include/{shared,static}/

Also, Windows native does not have compiler wrappers.

Note

  • this PR is unrelated to !4343 (merged)
  • this PR fixes some of the issues in #20205, but more mostly orthogonal work may be needed for HDF5 1.12 (now in beta)

Issue: #20205
Topic-rename: FindHDF5-verify-wrappers

Edited Feb 10, 2020 by Brad King
Assignee
Assign to
Reviewer
Request review from
3.18.0
Milestone
3.18.0 (Past due)
Assign milestone
Time tracking
Reference: cmake/cmake!4345
Source branch: findhdf5_nowrap

Revert this merge request

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.