Skip to content

Commit e5ec133

Browse files
authored
CI: Should not set GMT_USE_THREADS if optional package are not installed (#8601)
1 parent 8103975 commit e5ec133

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ci/config-gmt-unix.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ set (CMAKE_INSTALL_PREFIX "$ENV{INSTALLDIR}")
99
set (GSHHG_ROOT "$ENV{COASTLINEDIR}/gshhg")
1010
set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw")
1111
12-
set (GMT_USE_THREADS TRUE)
1312
set (GMT_ENABLE_OPENMP TRUE)
1413
1514
# Always use the 'static' data server in CI.
@@ -21,6 +20,12 @@ set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}")
2120
set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
2221
EOF
2322

23+
if [ "$EXCLUDE_OPTIONAL" = "true" ]; then
24+
echo 'set (GMT_USE_THREADS TRUE)' >> cmake/ConfigUser.cmake
25+
else
26+
echo 'set (GMT_USE_THREADS FALSE)' >> cmake/ConfigUser.cmake
27+
fi
28+
2429
# Set OpenMP_ROOT so that CMake can find the libomp header and library on macOS
2530
if [[ "$RUNNER_OS" == "macOS" ]]; then
2631
echo "set (OpenMP_ROOT $(brew --prefix)/opt/libomp/)" >> cmake/ConfigUser.cmake

0 commit comments

Comments
 (0)