fix dealii dependencies for Clang 9.1.0 C++17 (#7644)

* fix boost and muparser for Clang 9.1.0 with C++17

* muparser: add C++11 flags

* dealii: temporary disable python by default

* dealii: make CMake find right python
This commit is contained in:
Denis Davydov
2018-04-03 17:15:09 +02:00
committed by Adam J. Stewart
parent 17ace14751
commit 338fa8d7d6
5 changed files with 88 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ class Dealii(CMakePackage, CudaPackage):
description='Compile with Slepc (only with Petsc and MPI)')
variant('trilinos', default=True,
description='Compile with Trilinos (only with MPI)')
variant('python', default=True,
variant('python', default=False,
description='Compile with Python bindings')
variant('int64', default=False,
description='Compile with 64 bit indices support')
@@ -95,12 +95,12 @@ class Dealii(CMakePackage, CudaPackage):
# https://github.com/dealii/dealii/issues/5262
# we take the patch from https://github.com/boostorg/serialization/pull/79
# more precisely its variation https://github.com/dealii/dealii/pull/5572#issuecomment-349742019
depends_on('boost@1.59.0:1.63,1.65.1+thread+system+serialization+iostreams',
depends_on('boost@1.59.0:1.63,1.65.1,1.67.0:+thread+system+serialization+iostreams',
patches=patch('boost_1.65.1_singleton.patch',
level=1,
when='@1.65.1'),
when='~python')
depends_on('boost@1.59.0:1.63,1.65.1+thread+system+serialization+iostreams+python',
depends_on('boost@1.59.0:1.63,1.65.1,1.67.0:+thread+system+serialization+iostreams+python',
patches=patch('boost_1.65.1_singleton.patch',
level=1,
when='@1.65.1'),
@@ -223,6 +223,15 @@ def cmake_args(self):
'-DDEAL_II_COMPONENT_PYTHON_BINDINGS=%s' %
('ON' if '+python' in spec else 'OFF')
])
if '+python' in spec:
python_exe = spec['python'].command.path
python_library = spec['python'].libs[0]
python_include = spec['python'].headers.directories[0]
options.extend([
'-DPYTHON_EXECUTABLE=%s' % python_exe,
'-DPYTHON_INCLUDE_DIR=%s' % python_include,
'-DPYTHON_LIBRARY=%s' % python_library
])
# Set directory structure:
if spec.satisfies('@:8.2.1'):