Unidata / UDUNITS-2

API and utility for arithmetic manipulation of units of physical quantities
http://www.unidata.ucar.edu/software/udunits
Other
59 stars 36 forks source link

config.h.cmake is missing from .tar.gz archive #108

Open simonbyrne opened 2 years ago

simonbyrne commented 2 years ago

Attempting to build with cmake using the .tar.gz archive (https://artifacts.unidata.ucar.edu/repository/downloads-udunits/udunits-2.2.28.tar.gz) results in the following error:

CMake Error: File /Users/simon/src/udunits-2.2.28/config.h.cmake does not exist.
CMake Error at CMakeLists.txt:206 (CONFIGURE_FILE):
  CONFIGURE_FILE Problem configuring file

The file does appear in the .zip archive however (https://artifacts.unidata.ucar.edu/repository/downloads-udunits/udunits-2.2.28.zip)

semmerson commented 2 years ago

Odd. The file "config.h.cmake" doesn't exist. The file "config-cmake.h" does, however, and should be in the distribution. Is it?

simonbyrne commented 2 years ago

No, I don't see that either.

semmerson commented 2 years ago

@simonbyrne What's the "CONFIGURE_FILE" directive in your "CMakeLists.txt" file?

simonbyrne commented 2 years ago

It's the same as in the repository: https://github.com/Unidata/UDUNITS-2/blob/c83da987387db1174cd2266b73dd5dd556f4476b/CMakeLists.txt#L206-L208

semmerson commented 2 years ago

@simonbyrne Looks like I mistakenly left it out of the distribution (I'm still getting used to CMake). Here's what it should contain

/*
 * C macros set by cmake(1)
 */
#define DEFAULT_UDUNITS2_XML_PATH "@DEFAULT_UDUNITS2_XML_PATH@"
#cmakedefine DLL_UDUNITS2
#cmakedefine DLL_EXPORT
#cmakedefine HAVE_UNISTD_H 
#cmakedefine YY_NO_UNISTD_H

Try this and let me know.

simonbyrne commented 2 years ago

Thanks, I ended up using the .zip archive, which the necessary files, see https://github.com/JuliaPackaging/Yggdrasil/pull/4232