Skip to content

Commit 8dfa00e

Browse files
authored
Improve ci/build-gmt.sh to allow use ninja (#4883)
The `ci/build-gmt.sh` script is used by external projects like PyGMT. Use ninja if it's available to speed up the building.
1 parent fdb7bf2 commit 8dfa00e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ci/build-gmt.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ EOF
6363
# 5. Build and install GMT
6464
mkdir build
6565
cd build
66-
cmake ..
66+
if command -v ninja >/dev/null 2>&1 ; then
67+
cmake .. -G Ninja
68+
else
69+
cmake ..
70+
fi
6771
cmake --build .
6872
cmake --build . --target install
6973

0 commit comments

Comments
 (0)