Skip to content

Commit

Permalink
Merge pull request #16 from bokjo/build-macos-catalina-gcc-9
Browse files Browse the repository at this point in the history
Build changes for GCC-9, MacOS Catalina and new netcdf binary and library installed with Homebrew
  • Loading branch information
jllodra authored Dec 9, 2019
2 parents aa03418 + 5231bef commit 64aaacf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(CMAKE_BUILD_TYPE Release)

# Use GNU GCC on OSX (LLVM clang won't work, see Issues on github, change "gcc-5" accordingly with your current version!)
if(APPLE)
set(CMAKE_C_COMPILER "gcc-5")
set(CMAKE_C_COMPILER "gcc-9")
endif()

# Show all compile warnings
Expand All @@ -30,6 +30,11 @@ pkg_check_modules( Netcdf REQUIRED netcdf )
include_directories(src)
FILE(GLOB Ncdump-json-src "src/*.c")

if(APPLE)
include_directories(/usr/local/Cellar/netcdf/4.6.3_1/include)
FILE(GLOB Netcdf_LIBRARIES "/usr/local/Cellar/netcdf/4.6.3_1/lib/*.dylib")
endif()

#add_executable(ncdump-json src/ncdump.c src/vardata.c src/dumplib.c src/indent.c src/nctime.c src/nciter.c)
add_executable(ncdump-json ${Ncdump-json-src})

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ It behaves exactly like the original ncdump if you omit the command-line option
Installation:
* Download latest **release** from https://github.com/jllodra/ncdump-json/releases, **unzip**.
* Install **cmake** and **libnetcdf-dev**
* Install **cmake**, **libnetcdf-dev** and **pkg-config**
* **cd ncdump-json** directory
* **$cmake .**
* **$make** (you might get some warnings, it is ok).
Expand All @@ -33,6 +33,7 @@ Installation:
* You can run the tests included and add more: **cd tests; ./run_tests.sh**
Problems? It works (it's tested) on both *Linux* and *OSX*. Read the [Issues](https://github.com/jllodra/ncdump-json/issues?utf8=✓&q=is%3Aissue) before asking.
Debian and Ubuntu users might find interesting this comment: https://github.com/jllodra/ncdump-json/pull/16#issuecomment-562950007
---
Expand Down

0 comments on commit 64aaacf

Please sign in to comment.