diff options
author | Tom Payerle <payerle@umd.edu> | 2021-12-29 10:28:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 15:28:20 +0000 |
commit | eba3e1a20c6874a4ba7ce438959a631052e44076 (patch) | |
tree | b78ebaf9a11bbf2644d4762bb3c1fbce1f05a546 /var | |
parent | 95f2b10b4f5e385eedcba0e9fe18a902cd7c82b7 (diff) | |
download | spack-eba3e1a20c6874a4ba7ce438959a631052e44076.tar.gz spack-eba3e1a20c6874a4ba7ce438959a631052e44076.tar.bz2 spack-eba3e1a20c6874a4ba7ce438959a631052e44076.tar.xz spack-eba3e1a20c6874a4ba7ce438959a631052e44076.zip |
trilinos: fix x11 noheaderserror (#27966)
* trilinos: fix define_tpl to handle depspecs w/out headers
This should address #27758 (i.e. errors due to netlib-scalapack not
having headers)
* trilinos: This fixes a mismatch in variant name and spec name for x11/libx11
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/trilinos/package.py | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 68276b65ca..9f9680ee8c 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -8,6 +8,7 @@ import sys from spack import * from spack.build_environment import dso_suffix +from spack.error import NoHeadersError from spack.operating_systems.mac_os import macos_version from spack.pkg.builtin.kokkos import Kokkos @@ -561,31 +562,40 @@ class Trilinos(CMakePackage, CudaPackage): return depspec = spec[spack_name] libs = depspec.libs + try: + options.extend([ + define(trilinos_name + '_INCLUDE_DIRS', + depspec.headers.directories), + ]) + except NoHeadersError: + # Handle case were depspec does not have headers + pass + options.extend([ - define(trilinos_name + '_INCLUDE_DIRS', depspec.headers.directories), define(trilinos_name + '_ROOT', depspec.prefix), define(trilinos_name + '_LIBRARY_NAMES', libs.names), define(trilinos_name + '_LIBRARY_DIRS', libs.directories), ]) # Enable these TPLs explicitly from variant options. + # Format is (TPL name, variant name, Spack spec name) tpl_variant_map = [ - ('ADIOS2', 'adios2'), - ('Boost', 'boost'), - ('CUDA', 'cuda'), - ('HDF5', 'hdf5'), - ('HYPRE', 'hypre'), - ('MUMPS', 'mumps'), - ('UMFPACK', 'suite-sparse'), - ('SuperLU', 'superlu'), - ('SuperLUDist', 'superlu-dist'), - ('X11', 'x11'), + ('ADIOS2', 'adios2', 'adios2'), + ('Boost', 'boost', 'boost'), + ('CUDA', 'cuda', 'cuda'), + ('HDF5', 'hdf5', 'hdf5'), + ('HYPRE', 'hypre', 'hypre'), + ('MUMPS', 'mumps', 'mumps'), + ('UMFPACK', 'suite-sparse', 'suite-sparse'), + ('SuperLU', 'superlu', 'superlu'), + ('SuperLUDist', 'superlu-dist', 'superlu-dist'), + ('X11', 'x11', 'libx11'), ] if spec.satisfies('@13.0.2:'): - tpl_variant_map.append(('STRUMPACK', 'strumpack')) + tpl_variant_map.append(('STRUMPACK', 'strumpack', 'strumpack')) - for tpl_name, var_name in tpl_variant_map: - define_tpl(tpl_name, var_name, spec.variants[var_name].value) + for tpl_name, var_name, spec_name in tpl_variant_map: + define_tpl(tpl_name, spec_name, spec.variants[var_name].value) # Enable these TPLs based on whether they're in our spec; prefer to # require this way so that packages/features disable availability |