trilinos: add variant to build tests (#40284)

* trilinos: add variant: testing

* trilinos: rename +testing to +test
This commit is contained in:
eugeneswalker 2023-10-04 14:32:30 -07:00 committed by GitHub
parent 0f43074f3e
commit 79e7da9420
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -148,6 +148,7 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage):
variant("stratimikos", default=False, description="Compile with Stratimikos") variant("stratimikos", default=False, description="Compile with Stratimikos")
variant("teko", default=False, description="Compile with Teko") variant("teko", default=False, description="Compile with Teko")
variant("tempus", default=False, description="Compile with Tempus") variant("tempus", default=False, description="Compile with Tempus")
variant("test", default=False, description="Enable testing")
variant("thyra", default=False, description="Compile with Thyra") variant("thyra", default=False, description="Compile with Thyra")
variant("tpetra", default=True, description="Compile with Tpetra") variant("tpetra", default=True, description="Compile with Tpetra")
variant("trilinoscouplings", default=False, description="Compile with TrilinosCouplings") variant("trilinoscouplings", default=False, description="Compile with TrilinosCouplings")
@ -616,6 +617,12 @@ def define_enable(suffix, value=None):
] ]
) )
if "+test" in spec:
options.append(define_trilinos_enable("TESTS", True))
options.append(define("BUILD_TESTING", True))
else:
options.append(define_trilinos_enable("TESTS", False))
if spec.version >= Version("13"): if spec.version >= Version("13"):
options.append(define_from_variant("CMAKE_CXX_STANDARD", "cxxstd")) options.append(define_from_variant("CMAKE_CXX_STANDARD", "cxxstd"))
else: else: