Unidata / netcdf-c

Official GitHub repository for netCDF-C libraries and utilities.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConfigPackageLocation needs to be absolute path

DennisHeimbigner opened this issue · comments

Using cmake version 3.28.3 under Cygwin.

When I started using the new changes to the cmake build, I encountered this error

CMake Error at /usr/share/cmake-3.28.3/Modules/CMakePackageConfigHelpers.cmake:275 (file):
  file RELATIVE_PATH must be passed a full path to the directory:
  d:/tmp/netcdf/lib/cmake/netCDF
Call Stack (most recent call first):
  CMakeLists.txt:1807 (configure_package_config_file)

Has anyone else seen this?

Could you post a longer file but add the --trace-expand option to cmake? It will add A LOT more output, but could help figure out what exactly cmake is mad about

That is a distinctly odd path to see on Cygwin (/cygdrive/d/tmp/netcdf/lib/cmake/netCDF would be more common): did you add CMake and Ninja to the package-install list? I've gotten netCDF to compile on Cygwin using CMake, but then it crashes when I try running the tests.

@DennisHeimbigner as I recall there is a cygwin environmental variable which can be used to modify the pathing scheme cygwin uses. I forget what it is, off the top of my head, but could that be at play here?

CYGWIN and CYGWIN_NOWINPATH (alternate description) are the environment variables that I know of that affect Cygwin path handling, but neither of those mention that kind of path handling.

Support for Windows absolute paths varies on Cygwin: some programs handle them just fine, others see they start with a letter and decide they're relative paths, which results in some odd file names, especially if you don't notice for a while.

Current attempt to use CMake on Cygwin is here