Skip to content

Commit

Permalink
docs: document how to enable GMT_VER_5 macro in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
sean0921 committed Sep 20, 2022
1 parent af45db2 commit 678b448
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ cmake .
make
```

To build program compatible with GMT 5.x or 6.x:
edit CMakeLists.txt to uncomment following line:
```
add_compile_options(-D GMT_VER_5)
```
then:
```
cd src
rm CMakeCache.txt
cmake .
make
```

Thanks to Gilles Celli (European Center for Geodynamics and Seismology) for creating and debugging the NonLinLoc CMake build system.


Expand Down
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ add_compile_options(-fcommon)
# export CFLAGS='-D _GNU_SOURCE'
# before running: rm CMakeCache.txt; cmake .

# 20220921 Sean Ho - Uncomment the following if you want Grid2GMT to generate scripts compatible with gmt 5.x or 6.x
#add_compile_options(-D GMT_VER_5)
#
# Alternatively, in the make environment, set:
# export CFLAGS='-D GMT_VER_5'
# before running: rm CMakeCache.txt; cmake .

# 20211110 AJL - New fix implemented, see https://github.com/alomax/NonLinLoc/issues/7
# This fix probably supersedes the following:
Expand Down

0 comments on commit 678b448

Please sign in to comment.