summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Nicholas Swatman <stephen@v25.nl>2024-08-22 13:13:21 +0200
committerGitHub <noreply@github.com>2024-08-22 05:13:21 -0600
commitba566225741081bc26c7cf6c6c652ac0de6e6471 (patch)
tree075b4840059db67e72f28e891af286a3bc8d6af0
parent836be2364ca62e01e89ac07c8e18b19949fc43b4 (diff)
downloadspack-ba566225741081bc26c7cf6c6c652ac0de6e6471.tar.gz
spack-ba566225741081bc26c7cf6c6c652ac0de6e6471.tar.bz2
spack-ba566225741081bc26c7cf6c6c652ac0de6e6471.tar.xz
spack-ba566225741081bc26c7cf6c6c652ac0de6e6471.zip
geomodel: fix bug in cmake_args (#45869)
-rw-r--r--var/spack/repos/builtin/packages/geomodel/package.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/geomodel/package.py b/var/spack/repos/builtin/packages/geomodel/package.py
index 2fc531fbf8..43f81110c5 100644
--- a/var/spack/repos/builtin/packages/geomodel/package.py
+++ b/var/spack/repos/builtin/packages/geomodel/package.py
@@ -71,16 +71,12 @@ class Geomodel(CMakePackage):
depends_on("opengl")
def cmake_args(self):
- def cmake_variant(cmake_label, spack_variant):
- enabled = spec.satisfies("+" + spack_variant)
- return f"-DGEOMODEL_BUILD_{cmake_label}={enabled}"
-
args = [
- cmake_variant("VISUALIZATION", "visualization"),
- cmake_variant("GEOMODELG4", "geomodelg4"),
- cmake_variant("FULLSIMLIGHT", "fullsimlight"),
- cmake_variant("FSL", "fsl"),
- cmake_variant("EXAMPLES", "examples"),
- cmake_variant("TOOLS", "tools"),
+ self.define_from_variant("GEOMODEL_BUILD_VISUALIZATION", "visualization"),
+ self.define_from_variant("GEOMODEL_BUILD_GEOMODELG4", "geomodelg4"),
+ self.define_from_variant("GEOMODEL_BUILD_FULLSIMLIGHT", "fullsimlight"),
+ self.define_from_variant("GEOMODEL_BUILD_FSL", "fsl"),
+ self.define_from_variant("GEOMODEL_BUILD_EXAMPLES", "examples"),
+ self.define_from_variant("GEOMODEL_BUILD_TOOLS", "tools"),
]
return args