Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
More tweaks. Turns out the cibuildwheel netcdf libraries are super ol…
Browse files Browse the repository at this point in the history
…d and I can't get them to link
  • Loading branch information
daminton committed Aug 16, 2023
1 parent ccc9cd4 commit 2d6cf87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmake/Modules/FindNETCDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ ELSE ()
ELSE ()
MESSAGE(FATAL_ERROR "Cannot find nc-config")
ENDIF ()
IF (DEFINED ENV{LIBS})
SEPARATE_ARGUMENTS(LIBS NATIVE_COMMAND "$ENV{LIBS}")
LIST(APPEND EXTRA_FLAGS ${LIBS})
ENDIF()

# Note for posterity: When building static libraries, NETCDF_FORTRAN_LIBRARY must come *before* NETCDF_LIBRARY. Otherwise you get a bunch of "undefined reference to" errors
SET(NETCDF_LIBRARIES ${NETCDF_FORTRAN_LIBRARY} ${NETCDF_LIBRARY} ${EXTRA_FLAGS} CACHE STRING "NetCDF Fortran and dependant static libraries")
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ build-backend = "setuptools.build_meta"
[tool.cibuildwheel.linux]
environment = {SKBUILD_CONFIGURE_OPTIONS="-DBUILD_SHARED_LIBS=OFF"}
before-all = [
"yum install netcdf-fortran-static netcdf-static hdf5-static -y"
"yum install m4 doxygen -y",
"buildscripts/fetch_dependencies.sh -d build",
"buildscripts/build_dependencies.sh -c GNU-Linux -p /usr/local"
]

0 comments on commit 2d6cf87

Please sign in to comment.