dbcsr: examples variant (#42543)
This commit is contained in:
parent
514260d8cb
commit
a28c6caac0
@ -46,6 +46,7 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
|
||||
" with cuda_arch=35 for a K20x instead of a K40"
|
||||
),
|
||||
)
|
||||
variant("examples", default=True, description="Build examples")
|
||||
|
||||
variant("opencl", default=False, description="Enable OpenCL backend")
|
||||
variant("mpi_f08", default=False, when="@2.6:", description="Use mpi F08 module")
|
||||
@ -69,6 +70,9 @@ class Dbcsr(CMakePackage, CudaPackage, ROCmPackage):
|
||||
|
||||
depends_on("opencl", when="+opencl")
|
||||
|
||||
# All examples require MPI
|
||||
conflicts("+examples", when="~mpi", msg="Examples require MPI")
|
||||
|
||||
# We only support specific gpu archs for which we have parameter files
|
||||
# for optimal kernels. Note that we don't override the parent class arch
|
||||
# properties, since the parent class defines constraints for different archs
|
||||
@ -131,6 +135,7 @@ def cmake_args(self):
|
||||
"-DLAPACK_FOUND=true",
|
||||
"-DLAPACK_LIBRARIES=%s" % (spec["lapack"].libs.joined(";")),
|
||||
self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||
self.define_from_variant("WITH_EXAMPLES", "examples"),
|
||||
]
|
||||
|
||||
# Switch necessary as a result of a bug.
|
||||
|
Loading…
Reference in New Issue
Block a user