Paraview package: build on Windows (#36583)
* Prevent use of x11 * Don't define mpi compilers in cmake interface as MSMPI has no compiler wrapper.
This commit is contained in:
parent
32f2d7ab7e
commit
ced6353e14
1 changed files with 16 additions and 10 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
import itertools
|
||||
import os
|
||||
import sys
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -395,10 +396,11 @@ def nvariant_bool(feature):
|
|||
|
||||
rendering = variant_bool("+opengl2", "OpenGL2", "OpenGL")
|
||||
includes = variant_bool("+development_files")
|
||||
use_x11 = nvariant_bool("+osmesa") if not spec.satisfies("platform=windows") else "OFF"
|
||||
|
||||
cmake_args = [
|
||||
"-DVTK_OPENGL_HAS_OSMESA:BOOL=%s" % variant_bool("+osmesa"),
|
||||
"-DVTK_USE_X:BOOL=%s" % nvariant_bool("+osmesa"),
|
||||
"-DVTK_USE_X:BOOL=%s" % use_x11,
|
||||
"-DPARAVIEW_INSTALL_DEVELOPMENT_FILES:BOOL=%s" % includes,
|
||||
"-DBUILD_TESTING:BOOL=OFF",
|
||||
"-DOpenGL_GL_PREFERENCE:STRING=LEGACY",
|
||||
|
@ -502,15 +504,19 @@ def nvariant_bool(feature):
|
|||
cmake_args.append("-DPARAVIEW_ENABLE_PYTHON:BOOL=OFF")
|
||||
|
||||
if "+mpi" in spec:
|
||||
cmake_args.extend(
|
||||
[
|
||||
"-DPARAVIEW_USE_MPI:BOOL=ON",
|
||||
"-DMPIEXEC:FILEPATH=%s/bin/mpiexec" % spec["mpi"].prefix,
|
||||
"-DMPI_CXX_COMPILER:PATH=%s" % spec["mpi"].mpicxx,
|
||||
"-DMPI_C_COMPILER:PATH=%s" % spec["mpi"].mpicc,
|
||||
"-DMPI_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc,
|
||||
]
|
||||
)
|
||||
mpi_args = [
|
||||
"-DPARAVIEW_USE_MPI:BOOL=ON",
|
||||
"-DMPIEXEC:FILEPATH=%s/bin/mpiexec" % spec["mpi"].prefix,
|
||||
]
|
||||
if not sys.platform == "win32":
|
||||
mpi_args.extend(
|
||||
[
|
||||
"-DMPI_CXX_COMPILER:PATH=%s" % spec["mpi"].mpicxx,
|
||||
"-DMPI_C_COMPILER:PATH=%s" % spec["mpi"].mpicc,
|
||||
"-DMPI_Fortran_COMPILER:PATH=%s" % spec["mpi"].mpifc,
|
||||
]
|
||||
)
|
||||
cmake_args.extend(mpi_args)
|
||||
|
||||
cmake_args.append("-DPARAVIEW_BUILD_SHARED_LIBS:BOOL=%s" % variant_bool("+shared"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue