Skip to content

Commit 8d1369d

Browse files
Merge pull request #3283 from ggouaillardet/topic/nvml
build nvml support only with CUDA support
2 parents 9a69b20 + 10ea991 commit 8d1369d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

opal/mca/hwloc/hwloc1116/configure.m4

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,17 @@ AC_DEFUN([MCA_opal_hwloc_hwloc1116_CONFIG],[
111111
enable_libxml2=no
112112
enable_xml=yes
113113

114+
# Disable NVML support if CUDA support is not built
115+
AS_IF([test "$opal_check_cuda_happy" != "yes"],
116+
[enable_nvml=no])
117+
114118
# hwloc checks for compiler visibility, and its needs to do
115119
# this without "picky" flags.
116120
opal_hwloc_hwloc1116_save_cflags=$CFLAGS
117121
CFLAGS=$OPAL_CFLAGS_BEFORE_PICKY
122+
AS_IF([test -n "$opal_datatype_cuda_CPPFLAGS"],
123+
[CPPFLAGS="$CPPFLAGS $opal_datatype_cuda_CPPFLAGS"])
124+
118125
HWLOC_SETUP_CORE([opal/mca/hwloc/hwloc1116/hwloc],
119126
[AC_MSG_CHECKING([whether hwloc configure succeeded])
120127
AC_MSG_RESULT([yes])

0 commit comments

Comments
 (0)