vtk: Support for new option to enable MPI. (#17727)

This commit is contained in:
Tomoki, Karatsu 2020-07-31 12:05:20 +09:00 committed by GitHub
parent 7dd5793b75
commit 50f96e15de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ class Vtk(CMakePackage):
depends_on('sqlite', when='@8.2.0:') depends_on('sqlite', when='@8.2.0:')
# For finding Fujitsu-MPI wrapper commands # For finding Fujitsu-MPI wrapper commands
patch('find_fujitsu_mpi.patch', when='%fj') patch('find_fujitsu_mpi.patch', when='@:8.2.0%fj')
def url_for_version(self, version): def url_for_version(self, version):
url = "http://www.vtk.org/files/release/{0}/VTK-{1}.tar.gz" url = "http://www.vtk.org/files/release/{0}/VTK-{1}.tar.gz"
@ -159,10 +159,15 @@ def cmake_args(self):
]) ])
if '+mpi' in spec: if '+mpi' in spec:
cmake_args.extend([ if spec.satisfies('@:8.2.0'):
'-DVTK_Group_MPI:BOOL=ON', cmake_args.extend([
'-DVTK_USE_SYSTEM_DIY2:BOOL=OFF', '-DVTK_Group_MPI:BOOL=ON',
]) '-DVTK_USE_SYSTEM_DIY2:BOOL=OFF'
])
else:
cmake_args.extend([
'-DVTK_USE_MPI=ON'
])
if '+ffmpeg' in spec: if '+ffmpeg' in spec:
cmake_args.extend(['-DModule_vtkIOFFMPEG:BOOL=ON']) cmake_args.extend(['-DModule_vtkIOFFMPEG:BOOL=ON'])