Skip to content

Commit

Permalink
[R] fix OpenMP detection on macOS (#8684)
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Jan 16, 2023
1 parent 4315265 commit 06ba285
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R-package/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2857,7 +2857,7 @@ main (void)
return 0;
}
_ACEOF
${CC} -o conftest conftest.c ${CPPFLAGS} ${LDFLAGS} ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes
${CXX} -o conftest conftest.cpp ${CPPFLAGS} ${LDFLAGS} ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_pkg_openmp}" >&5
printf "%s\n" "${ac_pkg_openmp}" >&6; }
if test "${ac_pkg_openmp}" = no; then
Expand Down
2 changes: 1 addition & 1 deletion R-package/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ then
ac_pkg_openmp=no
AC_MSG_CHECKING([whether OpenMP will work in a package])
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include <omp.h>]], [[ return (omp_get_max_threads() <= 1); ]])])
${CC} -o conftest conftest.c ${CPPFLAGS} ${LDFLAGS} ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes
${CXX} -o conftest conftest.cpp ${CPPFLAGS} ${LDFLAGS} ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes
AC_MSG_RESULT([${ac_pkg_openmp}])
if test "${ac_pkg_openmp}" = no; then
OPENMP_CXXFLAGS=''
Expand Down

0 comments on commit 06ba285

Please sign in to comment.