Fix build when +stratimikos +xpetra (#17971)
If Thyra isn't explicitly enabled at the package level, trilinos fails to build. ``` /var/folders/gy/mrg1ffts2h945qj9k29s1l1dvvmbqb/T/s3j/spack-stage/spack-stage-trilinos-12.18.1-vfmemkls4ncta6qoptm5s7bcmrxnjhnd/spack-src/packages/muelu/adapters/stratimikos/Thyra_XpetraLinearOp_def.hpp:167:15: error: no member named 'ThyraUtils' in namespace 'Xpetra' Xpetra::ThyraUtils<Scalar,LocalOrdinal,GlobalOrdinal,Node>::toXpetra(rcpFromRef(X_in), comm); ~~~~~~~~^ ```
This commit is contained in:
parent
96ac5add9d
commit
26bab9d4d6
@ -245,6 +245,7 @@ class Trilinos(CMakePackage):
|
|||||||
conflicts('+amesos', when='~epetra')
|
conflicts('+amesos', when='~epetra')
|
||||||
conflicts('+amesos', when='~teuchos')
|
conflicts('+amesos', when='~teuchos')
|
||||||
conflicts('+anasazi', when='~teuchos')
|
conflicts('+anasazi', when='~teuchos')
|
||||||
|
conflicts('+aztec', when='~epetra')
|
||||||
conflicts('+belos', when='~teuchos')
|
conflicts('+belos', when='~teuchos')
|
||||||
conflicts('+epetraext', when='~epetra')
|
conflicts('+epetraext', when='~epetra')
|
||||||
conflicts('+epetraext', when='~teuchos')
|
conflicts('+epetraext', when='~teuchos')
|
||||||
@ -515,6 +516,13 @@ def define_tpl_enable(cmake_var, spec_var=None):
|
|||||||
])
|
])
|
||||||
|
|
||||||
if '+stratimikos' in spec:
|
if '+stratimikos' in spec:
|
||||||
|
# Explicitly enable Thyra (ThyraCore is required). If you don't do
|
||||||
|
# this, then you get "NOT setting ${pkg}_ENABLE_Thyra=ON since
|
||||||
|
# Thyra is NOT enabled at this point!" leading to eventual build
|
||||||
|
# errors if using MueLu because `Xpetra_ENABLE_Thyra` is set to
|
||||||
|
# off.
|
||||||
|
options.append(define('Trilinos_ENABLE_Thyra', True))
|
||||||
|
|
||||||
# Add thyra adapters based on package enables
|
# Add thyra adapters based on package enables
|
||||||
options.extend(
|
options.extend(
|
||||||
define_trilinos_enable('Thyra' + pkg + 'Adapters', pkg.lower())
|
define_trilinos_enable('Thyra' + pkg + 'Adapters', pkg.lower())
|
||||||
|
Loading…
Reference in New Issue
Block a user