Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 4,168
    • Issues 4,168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMakeCMake
  • CMakeCMake
  • Issues
  • #17029
Closed
Open
Issue created Jul 02, 2017 by Kris Thielemans@krthieContributor

FindHDF5 ignores preset HDF5_DIR

Setting HDF5_DIR has no effect. This might be because FindHDF5.cmake only checks HDF5_ROOT when trying to find a CONFIG version:

if(HDF5_ROOT)
    set(_HDF5_SEARCH_OPTS NO_DEFAULT_PATH)
else()
    set(_HDF5_SEARCH_OPTS)
endif()

# Try to find HDF5 using an installed hdf5-config.cmake
if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
    find_package(HDF5 QUIET NO_MODULE
      HINTS "${HDF5_ROOT}"
      ${_HDF5_SEARCH_OPTS}
      ) 
...

Nevertheless, even when setting HDF5_ROOT (or when changing the above code) the above find_package only finds my system-version of hdf5-config.cmake (i.e., the one installed in c:\Program Files) and refuses to find my own installed version whatever I do with HDF5_ROOT and HDF5_DIR (I tried on Windows with CMake 3.9-rc5). If I remove the QUIET option in the find_package statement above, I get the confusing message

Could NOT find HDF5 (missing: HDF5_DIR)

even if HDF5_DIR is set.

It seems that I still don't understand find_package and Config files...

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking