hdf5: patch out mpicxx lib when +mpi~cxx fixes #12586 (#12640)

This commit is contained in:
Pariksheet Nanda 2019-08-28 22:49:53 -04:00 committed by Adam J. Stewart
parent 85e13ebc03
commit 300d9d5a62
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/src/H5public.h 2019-08-28 18:51:39.393781356 -0400
+++ b/src/H5public.h 2019-08-28 20:59:50.315181711 -0400
@@ -57,6 +57,8 @@
# include <stddef.h>
#endif
#ifdef H5_HAVE_PARALLEL
+# define MPICH_SKIP_MPICXX 1
+# define OMPI_SKIP_MPICXX 1
# include <mpi.h>
#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */
# include <mpio.h>

View File

@ -111,6 +111,11 @@ class Hdf5(AutotoolsPackage):
sha256='57cee5ff1992b4098eda079815c36fc2da9b10e00a9056df054f2384c4fc7523',
when='@1.10.2%gcc@8:')
# Disable MPI C++ interface when C++ is disabled, otherwise downstream
# libraries fail to link; see https://github.com/spack/spack/issues/12586
patch('h5public-skip-mpicxx.patch', when='+mpi~cxx',
sha256='b61e2f058964ad85be6ee5ecea10080bf79e73f83ff88d1fa4b602d00209da9c')
filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc', relative_root='bin')
def url_for_version(self, version):