diamond: add blast support and eigen (#45254)
Signed-off-by: Shane Nehring <snehring@iastate.edu>
This commit is contained in:
parent
8de03e2bf5
commit
28171f1b9d
@ -39,10 +39,38 @@ class Diamond(CMakePackage):
|
|||||||
depends_on("c", type="build") # generated
|
depends_on("c", type="build") # generated
|
||||||
depends_on("cxx", type="build") # generated
|
depends_on("cxx", type="build") # generated
|
||||||
|
|
||||||
|
depends_on("blas", when="+eigen")
|
||||||
|
depends_on("blast-plus", when="+blast")
|
||||||
|
depends_on("eigen", when="+eigen")
|
||||||
|
depends_on("lapack", when="+eigen")
|
||||||
depends_on("zlib-api")
|
depends_on("zlib-api")
|
||||||
|
depends_on("zstd", when="+zstd")
|
||||||
|
|
||||||
|
variant("zstd", default=False, description="Bulid with zstd support", when="@2.1.0:")
|
||||||
|
variant("blast", default=True, description="Build with blast db support", when="@2.1.0:")
|
||||||
|
variant("eigen", default=False, description="Build with Eigen support", when="@2.1.0:")
|
||||||
|
|
||||||
|
requires("+zstd", when="+blast", msg="blast support requires zstd")
|
||||||
|
|
||||||
conflicts("target=aarch64:", when="@:0.9.25")
|
conflicts("target=aarch64:", when="@:0.9.25")
|
||||||
|
|
||||||
# fix error [-Wc++11-narrowing]
|
# fix error [-Wc++11-narrowing]
|
||||||
# Ref: https://github.com/bbuchfink/diamond/commit/155e076d662b0e9268e2b00bef6d33d90aede7ff
|
# Ref: https://github.com/bbuchfink/diamond/commit/155e076d662b0e9268e2b00bef6d33d90aede7ff
|
||||||
patch("fix_narrowing_error.patch", when="@:0.9.25")
|
patch("fix_narrowing_error.patch", when="@:0.9.25")
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
args = [
|
||||||
|
self.define_from_variant("WITH_ZSTD", "zstd"),
|
||||||
|
self.define_from_variant("EIGEN_BLAS", "eigen"),
|
||||||
|
]
|
||||||
|
if self.spec.satisfies("+blast"):
|
||||||
|
args.extend(
|
||||||
|
[
|
||||||
|
self.define(
|
||||||
|
"BLAST_INCLUDE_DIR",
|
||||||
|
join_path(self.spec["blast-plus"].prefix.include, "ncbi-tools++"),
|
||||||
|
),
|
||||||
|
self.define("BLAST_LIBRARY_DIR", self.spec["blast-plus"].prefix.lib),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user