Skip to content

Commit

Permalink
machines: add CFLAGS_HOST to conda_macos for recent macOS
Browse files Browse the repository at this point in the history
Recent versions of Xcode and macOS do not install the system C header files
to /usr/include, but keep them in the MacOSX SDK.
Thus we need to explicitely pass their location to the compiler.
  • Loading branch information
phil-blain committed Jan 13, 2020
1 parent 361c1a8 commit b94b4fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configuration/scripts/machines/Macros.conda_macos
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ LD:= $(FC)
# Location of the compiled Fortran modules (NetCDF)
MODDIR += -I$(CONDA_PREFIX)/include

# Location of the system C header files (required on recent macOS to compile makdep)
CFLAGS_HOST += -I$(shell xcrun --show-sdk-path)/usr/include

# Libraries to be passed to the linker
SLIBS := -lnetcdf -lnetcdff

Expand Down

0 comments on commit b94b4fa

Please sign in to comment.