Added CPPFLAGS and LDFLAGS to the testing for OpenMP during R installation from source. (#7759)
This commit is contained in:
parent
b37ff3d492
commit
39c5616af2
1812
R-package/configure
vendored
1812
R-package/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
|||||||
### configure.ac -*- Autoconf -*-
|
### configure.ac -*- Autoconf -*-
|
||||||
|
|
||||||
AC_PREREQ(2.69)
|
AC_PREREQ(2.71)
|
||||||
|
|
||||||
AC_INIT([xgboost],[0.6-3],[],[xgboost],[])
|
AC_INIT([xgboost],[1.6-0],[],[xgboost],[])
|
||||||
|
|
||||||
# Use this line to set CC variable to a C compiler
|
# Use this line to set CC variable to a C compiler
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@ -33,7 +33,7 @@ then
|
|||||||
ac_pkg_openmp=no
|
ac_pkg_openmp=no
|
||||||
AC_MSG_CHECKING([whether OpenMP will work in a package])
|
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); ]])])
|
AC_LANG_CONFTEST([AC_LANG_PROGRAM([[#include <omp.h>]], [[ return (omp_get_max_threads() <= 1); ]])])
|
||||||
${CC} -o conftest conftest.c ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes
|
${CC} -o conftest conftest.c ${CPPFLAGS} ${LDFLAGS} ${OPENMP_LIB} ${OPENMP_CXXFLAGS} 2>/dev/null && ./conftest && ac_pkg_openmp=yes
|
||||||
AC_MSG_RESULT([${ac_pkg_openmp}])
|
AC_MSG_RESULT([${ac_pkg_openmp}])
|
||||||
if test "${ac_pkg_openmp}" = no; then
|
if test "${ac_pkg_openmp}" = no; then
|
||||||
OPENMP_CXXFLAGS=''
|
OPENMP_CXXFLAGS=''
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user