mpifileutils: add DAOS variant (#35618)
* mpifileutils: add DAOS variant * mpifileutils: Add daos dep when +daos Add dependency on DAOS when +daos Pass DAOS prefix to ensure correct DAOS is found by during configuration * Change in to satisfies for boolean variants --------- Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
This commit is contained in:
parent
b1ab01280a
commit
0efd5287c4
@ -50,6 +50,8 @@ class Mpifileutils(Package):
|
||||
|
||||
depends_on("attr", when="@0.11.1:+xattr")
|
||||
|
||||
depends_on("daos", when="+daos")
|
||||
|
||||
depends_on("bzip2")
|
||||
|
||||
depends_on("libcap")
|
||||
@ -68,6 +70,8 @@ class Mpifileutils(Package):
|
||||
variant("experimental", default=False, description="Install experimental tools")
|
||||
conflicts("+experimental", when="@:0.6")
|
||||
|
||||
variant("daos", default=False, description="Enable DAOS support", when="@0.11:")
|
||||
|
||||
def flag_handler(self, name, flags):
|
||||
spec = self.spec
|
||||
iflags = []
|
||||
@ -82,26 +86,32 @@ def cmake_args(self):
|
||||
args.append("-DWITH_DTCMP_PREFIX=%s" % self.spec["dtcmp"].prefix)
|
||||
args.append("-DWITH_LibCircle_PREFIX=%s" % self.spec["libcircle"].prefix)
|
||||
|
||||
if "+xattr" in self.spec:
|
||||
if self.spec.satisfies("+xattr"):
|
||||
args.append("-DENABLE_XATTRS=ON")
|
||||
else:
|
||||
args.append("-DENABLE_XATTRS=OFF")
|
||||
|
||||
if "+lustre" in self.spec:
|
||||
if self.spec.satisfies("+lustre"):
|
||||
args.append("-DENABLE_LUSTRE=ON")
|
||||
else:
|
||||
args.append("-DENABLE_LUSTRE=OFF")
|
||||
|
||||
if "+gpfs" in self.spec:
|
||||
if self.spec.satisfies("+gpfs"):
|
||||
args.append("-DENABLE_GPFS=ON")
|
||||
else:
|
||||
args.append("-DENABLE_GPFS=OFF")
|
||||
|
||||
if "+experimental" in self.spec:
|
||||
if self.spec.satisfies("+experimental"):
|
||||
args.append("-DENABLE_EXPERIMENTAL=ON")
|
||||
else:
|
||||
args.append("-DENABLE_EXPERIMENTAL=OFF")
|
||||
|
||||
if self.spec.satisfies("+daos"):
|
||||
args.append("-DENABLE_DAOS=ON")
|
||||
args.append("-DWITH_DAOS_PREFIX=%s" % self.spec["daos"].prefix)
|
||||
else:
|
||||
args.append("-DENABLE_DAOS=OFF")
|
||||
|
||||
return args
|
||||
|
||||
@when("@0.9:")
|
||||
@ -135,16 +145,16 @@ def configure_args(self):
|
||||
)
|
||||
args.append("--with-dtcmp=%s" % self.spec["dtcmp"].prefix)
|
||||
|
||||
if "+xattr" in self.spec:
|
||||
if self.spec.satisfies("+xattr"):
|
||||
args.append("CFLAGS=-DDCOPY_USE_XATTRS")
|
||||
|
||||
if "+lustre" in self.spec:
|
||||
if self.spec.satisfies("+lustre"):
|
||||
args.append("--enable-lustre")
|
||||
else:
|
||||
args.append("--disable-lustre")
|
||||
|
||||
if self.spec.satisfies("@0.7:"):
|
||||
if "+experimental" in self.spec:
|
||||
if self.spec.satisfies("+experimental"):
|
||||
args.append("--enable-experimental")
|
||||
else:
|
||||
args.append("--disable-experimental")
|
||||
|
Loading…
Reference in New Issue
Block a user