Skip to content

Commit

Permalink
CI: Should not set GMT_USE_THREADS if optional package are not instal…
Browse files Browse the repository at this point in the history
…led (#8601)
  • Loading branch information
seisman authored Oct 15, 2024
1 parent 8103975 commit e5ec133
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ci/config-gmt-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set (CMAKE_INSTALL_PREFIX "$ENV{INSTALLDIR}")
set (GSHHG_ROOT "$ENV{COASTLINEDIR}/gshhg")
set (DCW_ROOT "$ENV{COASTLINEDIR}/dcw")
set (GMT_USE_THREADS TRUE)
set (GMT_ENABLE_OPENMP TRUE)
# Always use the 'static' data server in CI.
Expand All @@ -21,6 +20,12 @@ set (CMAKE_C_FLAGS "-Wall -Wdeclaration-after-statement ${CMAKE_C_FLAGS}")
set (CMAKE_C_FLAGS "-Wextra ${CMAKE_C_FLAGS}")
EOF

if [ "$EXCLUDE_OPTIONAL" = "true" ]; then
echo 'set (GMT_USE_THREADS TRUE)' >> cmake/ConfigUser.cmake
else
echo 'set (GMT_USE_THREADS FALSE)' >> cmake/ConfigUser.cmake
fi

# Set OpenMP_ROOT so that CMake can find the libomp header and library on macOS
if [[ "$RUNNER_OS" == "macOS" ]]; then
echo "set (OpenMP_ROOT $(brew --prefix)/opt/libomp/)" >> cmake/ConfigUser.cmake
Expand Down

0 comments on commit e5ec133

Please sign in to comment.