summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/fenics/package.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/fenics/package.py b/var/spack/repos/builtin/packages/fenics/package.py
index e16e83410b..a58350b653 100644
--- a/var/spack/repos/builtin/packages/fenics/package.py
+++ b/var/spack/repos/builtin/packages/fenics/package.py
@@ -122,7 +122,7 @@ class Fenics(CMakePackage):
depends_on('py-sphinx@1.0.1:', when='+doc', type='build')
def cmake_args(self):
- return [
+ args = [
self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
self.define('DOLFIN_SKIP_BUILD_TESTS', True),
self.define_from_variant('DOLFIN_ENABLE_OPENMP', 'openmp'),
@@ -146,6 +146,12 @@ class Fenics(CMakePackage):
self.define_from_variant('DOLFIN_ENABLE_ZLIB', 'zlib'),
]
+ if '+python' in self.spec:
+ args.append(self.define(
+ 'PYTHON_EXECUTABLE', self.spec['python'].command.path))
+
+ return args
+
# set environment for bulding python interface
def setup_build_environment(self, env):
env.set('DOLFIN_DIR', self.prefix)