diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/comd/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/comd/package.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/comd/package.py b/var/spack/repos/builtin/packages/comd/package.py index f6c8463259..5d2e050a13 100644 --- a/var/spack/repos/builtin/packages/comd/package.py +++ b/var/spack/repos/builtin/packages/comd/package.py @@ -25,6 +25,8 @@ class Comd(MakefilePackage): version("develop", branch="master") version("1.1", sha256="4e85f86f043681a1ef72940fc24a4c71356a36afa45446f7cfe776abad6aa252") + depends_on("c", type="build") # generated + variant("mpi", default=True, description="Build with MPI support") variant("openmp", default=False, description="Build with OpenMP support") variant("precision", default=True, description="Toggle Precesion Options") @@ -48,11 +50,11 @@ class Comd(MakefilePackage): comd_variant = "CoMD" cc = spack_cc - if "+openmp" in self.spec: + if self.spec.satisfies("+openmp"): targets.append("--directory=src-openmp") comd_variant += "-openmp" cflags += " -fopenmp " - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): comd_variant += "-mpi" targets.append("CC = {0}".format(self.spec["mpi"].mpicc)) else: @@ -60,17 +62,17 @@ class Comd(MakefilePackage): else: targets.append("--directory=src-mpi") - if "~mpi" in self.spec: + if self.spec.satisfies("~mpi"): comd_variant += "-serial" targets.append("CC = {0}".format(cc)) else: comd_variant += "-mpi" targets.append("CC = {0}".format(self.spec["mpi"].mpicc)) - if "+mpi" in self.spec: + if self.spec.satisfies("+mpi"): cflags += "-DDO_MPI" targets.append("INCLUDES = {0}".format(self.spec["mpi"].prefix.include)) - if "+precision" in self.spec: + if self.spec.satisfies("+precision"): cflags += " -DDOUBLE " else: cflags += " -DSINGLE " |