rdma-core: add static variant (#35308)

Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
Andrew-Dunning-NNL 2023-02-16 19:01:19 -05:00 committed by GitHub
parent 68b711c1ad
commit 0468205751
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,12 @@ class RdmaCore(CMakePackage):
version("17.1", sha256="b47444b7c05d3906deb8771eec3e634984dd83f5e620d5e37d3a83f74f0cc1ba") version("17.1", sha256="b47444b7c05d3906deb8771eec3e634984dd83f5e620d5e37d3a83f74f0cc1ba")
version("13", sha256="e5230fd7cda610753ad1252b40a28b1e9cf836423a10d8c2525b081527760d97") version("13", sha256="e5230fd7cda610753ad1252b40a28b1e9cf836423a10d8c2525b081527760d97")
variant(
"static",
default=True,
description="Produce static libraries along with usual shared libraries.",
)
depends_on("pkgconfig", type="build") depends_on("pkgconfig", type="build")
depends_on("py-docutils", type="build") depends_on("py-docutils", type="build")
depends_on("libnl") depends_on("libnl")
@ -82,6 +88,8 @@ def cmake_args(self):
"-DCMAKE_INSTALL_RUNDIR=/var/run", "-DCMAKE_INSTALL_RUNDIR=/var/run",
] ]
cmake_args.append(self.define_from_variant("ENABLE_STATIC", "static"))
if self.spec.satisfies("@:39.0"): if self.spec.satisfies("@:39.0"):
cmake_args.extend( cmake_args.extend(
[ [