Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6469059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T05:56:55+00:00 2026-05-25T05:56:55+00:00

The script FindHDF5.cmake is available since CMake 2.8. My software runs on various systems

  • 0

The script FindHDF5.cmake is available since CMake 2.8. My software runs on various systems with either CMake 2.8 or 2.6.

When I use find_package(HDF5 REQUIRED) it works in 2.8 but of course not in 2.6. I was therefore thinking to copy FindHDF5.cmake in my project. But this is 1. ugly and 2. unmaintainable.

How do you handle such a situation ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T05:56:55+00:00Added an answer on May 25, 2026 at 5:56 am

    If you really need to use

    find_package(HDF5 REQUIRED)
    

    then you should really require CMake 2.8 or later.

    If you must run with CMake 2.6, then you should provide your own FindHDF5.cmake.

    You can use conditional logic based on the CMake version if you must, such as:

    if("${CMAKE_VERSION}" VERSION_LESS 2.8)
      # Use your own "CMake/FindHDF5.make"...
      set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
    endif()
    

    However, the CMAKE_VERSION variable was not available until CMake 2.6.3, so you’ll have to require at least CMake 2.6.3 in order to use such a construct reliably.

    See also:

    • http://cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_CURRENT_SOURCE_DIR
    • http://cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_MODULE_PATH
    • http://cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_VERSION
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The script below will replace selected word in a textarea. But it only works
The script runs fine when stdout/stderr are not redirected. When I add both stderr
This script I wrote works perfect on IE! It works on Chrome and FireFox
Script goes to the remote server and runs a shell script snap.sh using Net::SSH::Perl.
This script works fine in all other browsers except IE: nav.addEventListener('mouseover',function(e) { switch(e.target.id) {
My script runs fine and it alerts me the data is saved. but for
This script hasn't changed since yesterday when it was working and I used it
This script works as shown. I want to replace: alert(q2) ; with: window.location.href =
My script works everywhere except in Internet Explorer. Actually no big deal.. but my
Script: http://keith-wood.name/countdown.htm Daily json response: items: { fajr: '5:23 am', sharooq: '7:23 am', dhur:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.