summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/jali/package.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/jali/package.py b/var/spack/repos/builtin/packages/jali/package.py
index 7c36ed7fdd..ef1f9f0a52 100644
--- a/var/spack/repos/builtin/packages/jali/package.py
+++ b/var/spack/repos/builtin/packages/jali/package.py
@@ -44,15 +44,11 @@ class Jali(CMakePackage):
def cmake_args(self):
options = []
- if '+with_mstk' in self.spec:
- options.append('-DENABLE_MSTK_Mesh=ON')
- else:
- options.append('-DENABLE_MSTK_Mesh=OFF')
+
+ # Turn MSTK ON/OFF
+ options.append(self.define_from_variant('ENABLE_MSTK_Mesh', 'mstk'))
# Unit test variant
- if self.run_tests:
- options.append('-DENABLE_Tests=ON')
- else:
- options.append('-DENABLE_Tests=OFF')
+ options.append(self.define('ENABLE_TESTS', self.run_tests))
return options