|
| 1 | +# -*- shell-script -*- |
| 2 | +# |
| 3 | +# Copyright (c) 2004-2010 The Trustees of Indiana University. |
| 4 | +# All rights reserved. |
| 5 | +# Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved. |
| 6 | +# Copyright (c) 2015 Intel, Inc. All rights reserved. |
| 7 | +# Copyright (c) 2015 NVIDIA, Inc. All rights reserved. |
| 8 | +# $COPYRIGHT$ |
| 9 | +# |
| 10 | +# Additional copyrights may follow |
| 11 | +# |
| 12 | +# $HEADER$ |
| 13 | +# |
| 14 | + |
| 15 | +# OMPI_MPIEXT_cuda_CONFIG([action-if-found], [action-if-not-found]) |
| 16 | +# ----------------------------------------------------------- |
| 17 | +AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[ |
| 18 | + AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile]) |
| 19 | + AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile]) |
| 20 | + |
| 21 | + OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cuda_happy]) |
| 22 | + |
| 23 | + # If we don't want CUDA, don't compile this extention |
| 24 | + AS_IF([test "$ENABLE_cuda" = "1" || \ |
| 25 | + test "$ENABLE_EXT_ALL" = "1"], |
| 26 | + [ompi_mpi_ext_cuda_happy=1], |
| 27 | + [ompi_mpi_ext_cuda_happy=0]) |
| 28 | + |
| 29 | + AS_IF([test "$ompi_mpi_ext_cuda_happy" = "1" && \ |
| 30 | + test "$CUDA_SUPPORT" = "1"], |
| 31 | + [$1], |
| 32 | + [ # Error if the user specifically asked for this extension, |
| 33 | + # but we can't build it. |
| 34 | + AS_IF([test "$ENABLE_cuda" = "1"], |
| 35 | + [AC_MSG_WARN([Requested "cuda" MPI extension, but cannot build it]) |
| 36 | + AC_MSG_WARN([because cuda support is not enabled.]) |
| 37 | + AC_MSG_WARN([Try again with --with-cuda]) |
| 38 | + AC_MSG_ERROR([Cannot continue])]) |
| 39 | + $2]) |
| 40 | + |
| 41 | + OPAL_VAR_SCOPE_POP |
| 42 | +]) |
0 commit comments