Goddard-Fortran-Ecosystem / gFTL

Software containers for Fortran
Apache License 2.0
39 stars 9 forks source link

`gFTL-shared` does not find `gFTL` on case-sensitive OS: apparently, due to capitalized names in paths? #202

Open barracuda156 opened 11 months ago

barracuda156 commented 11 months ago

On Macports buildbots we got a failure: https://trac.macports.org/ticket/68505

CMake Error at CMakeLists.txt:38 (find_package):
  By not providing "FindgFTL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "gFTL", but
  CMake did not find one.

  Could not find a package configuration file provided by "gFTL" with any of
  the following names:

    gFTLConfig.cmake
    gftl-config.cmake

  Add the installation prefix of "gFTL" to CMAKE_PREFIX_PATH or set
  "gFTL_DIR" to a directory containing one of the above files.  If "gFTL"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!

Presumably, it is due to case-sensitivity, since both locally and on GH IC (which are set to be non-case-sensitive) the build is all good.

tclune commented 7 months ago

Sorry for not noticing this issue for so long. Somehow am not getting some notifications in my email.

For historical reasons, we export gFTL as "GFTL". So the correct find command is find_package(GFTL). My apologies for the confusion.

barracuda156 commented 7 months ago

@tclune Thank you for responding. Could this be fixed in the source in CMakeLists?

tclune commented 7 months ago

I would argue nothing is broken. find_package(GFTL) works fine in a large number of other projects.

If you know a simple way to have it export under both capitalizations (without breaking anything on case-insensitive systems), I'll be happy to incorporate the change.

barracuda156 commented 7 months ago

@tclune AFAIU, the problem occurs only if the OS is case-sensitive. (I am not sure since locally I had no problems.)