diff --git a/ompi/mpiext/cuda/c/mpiext_cuda_c.h b/ompi/mpiext/cuda/c/mpiext_cuda_c.h.in similarity index 88% rename from ompi/mpiext/cuda/c/mpiext_cuda_c.h rename to ompi/mpiext/cuda/c/mpiext_cuda_c.h.in index 00fd6216f85..0a95eeb3cb3 100644 --- a/ompi/mpiext/cuda/c/mpiext_cuda_c.h +++ b/ompi/mpiext/cuda/c/mpiext_cuda_c.h.in @@ -12,5 +12,5 @@ * */ -#define MPIX_CUDA_AWARE_SUPPORT 1 +#define MPIX_CUDA_AWARE_SUPPORT @MPIX_CUDA_AWARE_SUPPORT@ OMPI_DECLSPEC int MPIX_Query_cuda_support(void); diff --git a/ompi/mpiext/cuda/configure.m4 b/ompi/mpiext/cuda/configure.m4 index 09a458fffb9..cba2953a3f5 100644 --- a/ompi/mpiext/cuda/configure.m4 +++ b/ompi/mpiext/cuda/configure.m4 @@ -17,6 +17,10 @@ AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[ AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile]) AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile]) + AC_CONFIG_HEADER([ompi/mpiext/cuda/c/mpiext_cuda_c.h]) + + AC_DEFINE_UNQUOTED([MPIX_CUDA_AWARE_SUPPORT],[$CUDA_SUPPORT], + [Macro that is set to 1 when CUDA-aware support is configured in and 0 when it is not]) # We compile this whether CUDA support was requested or not. It allows # us to to detect if we have CUDA support.