Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Should not set GMT_USE_THREADS if optional package are not installed #8601

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading