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,298
    • Issues 3,298
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • 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
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #16397

Closed
Open
Created Nov 01, 2016 by Axel Huebl@ax3lContributor

CMake 3.6 & HDF5 COMPONENTS in C/CXX

In the HDF5 find module of the latest release of CMake (3.6.X+) the documentation states:

If the COMPONENTS argument is not given, the module will attempt to find only the C bindings.

this is wrong, since the default fallback chooses the global language: https://github.com/Kitware/CMake/blob/v3.6.2/Modules/FindHDF5.cmake#L116

if(NOT HDF5_FIND_COMPONENTS)
  get_property(__langs GLOBAL PROPERTY ENABLED_LANGUAGES)
# ...

This causes compile issues such as

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
HDF5_hdf5_cpp_LIBRARY

when compiling a C++ project against the C bindings of HDF5 without setting the COMPONENTS C in find(HDF5).

The HDF5 modules in CMake prior to 3.6 are not affected.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
3.6.3
Milestone
3.6.3 (Past due)
Assign milestone
Time tracking
None
Due date
None