SEACAS: Update package.py to handle new SEACAS project name (#33646)
The base project name for the SEACAS project has changed from "SEACASProj" to "SEACAS" as of @2022-10-14, so the package needed to be updated to use the new project name when needed. The refactor also changes several: "-DSome_CMAKE_Option:BOOL=ON" to define("Some_CMAKE_Option", True)
This commit is contained in:
parent
cff94f8e71
commit
d4ea74bf80
@ -15,10 +15,13 @@
|
|||||||
|
|
||||||
|
|
||||||
class Seacas(CMakePackage):
|
class Seacas(CMakePackage):
|
||||||
"""The SEACAS Project contains the Exodus and IOSS libraries and a
|
"""The SEACAS Project contains the Exodus and IOSS I/O libraries
|
||||||
collection of applications which create, query, modify, or
|
and a collection of applications which create, query, modify, or
|
||||||
translate exodus databases. Default is to build the exodus and
|
translate Exodus databases. Exodus is a finite element mesh and
|
||||||
IOSS libraries and the io_shell, io_info, io_modify, struc_to_unstruc apps.
|
results database file format.
|
||||||
|
|
||||||
|
Default is to build the Exodus and IOSS libraries and the
|
||||||
|
io_shell, io_info, io_modify, struc_to_unstruc apps.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
homepage = "https://sandialabs.github.io/seacas/"
|
homepage = "https://sandialabs.github.io/seacas/"
|
||||||
@ -131,7 +134,8 @@ class Seacas(CMakePackage):
|
|||||||
depends_on("hdf5+hl~mpi", when="~mpi")
|
depends_on("hdf5+hl~mpi", when="~mpi")
|
||||||
depends_on("cgns@4.2.0:+mpi+scoping", when="+cgns +mpi")
|
depends_on("cgns@4.2.0:+mpi+scoping", when="+cgns +mpi")
|
||||||
depends_on("cgns@4.2.0:~mpi+scoping", when="+cgns ~mpi")
|
depends_on("cgns@4.2.0:~mpi+scoping", when="+cgns ~mpi")
|
||||||
depends_on("fmt@8.1.0:", when="@2022-03-04:")
|
depends_on("fmt@8.1.0:", when="@2022-03-04:2022-05-16")
|
||||||
|
depends_on("fmt@9.1.0:", when="@2022-10-14")
|
||||||
|
|
||||||
with when("+adios2"):
|
with when("+adios2"):
|
||||||
depends_on("adios2@master")
|
depends_on("adios2@master")
|
||||||
@ -166,35 +170,49 @@ def cmake_args(self):
|
|||||||
from_variant = self.define_from_variant
|
from_variant = self.define_from_variant
|
||||||
define = self.define
|
define = self.define
|
||||||
|
|
||||||
|
if self.spec.satisfies("@2022-10-14:"):
|
||||||
|
project_name_base = "Seacas"
|
||||||
|
else:
|
||||||
|
project_name_base = "SEACASProj"
|
||||||
|
|
||||||
options = []
|
options = []
|
||||||
|
|
||||||
# #################### Base Settings #######################
|
# #################### Base Settings #######################
|
||||||
|
|
||||||
|
options.extend(
|
||||||
|
[
|
||||||
|
from_variant("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "shared"),
|
||||||
|
from_variant("BUILD_SHARED_LIBS", "shared"),
|
||||||
|
from_variant("SEACASExodus_ENABLE_THREADSAFE", "thread_safe"),
|
||||||
|
from_variant("SEACASIoss_ENABLE_THREADSAFE", "thread_safe"),
|
||||||
|
from_variant("TPL_ENABLE_X11", "x11"),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
if "+mpi" in spec:
|
if "+mpi" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
|
"-DCMAKE_C_COMPILER=%s" % spec["mpi"].mpicc,
|
||||||
"-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
|
"-DCMAKE_CXX_COMPILER=%s" % spec["mpi"].mpicxx,
|
||||||
"-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc,
|
"-DCMAKE_Fortran_COMPILER=%s" % spec["mpi"].mpifc,
|
||||||
"-DTPL_ENABLE_MPI:BOOL=ON",
|
define("TPL_ENABLE_MPI", True),
|
||||||
"-DMPI_BASE_DIR:PATH=%s" % spec["mpi"].prefix,
|
"-DMPI_BASE_DIR:PATH=%s" % spec["mpi"].prefix,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
"-DTPL_ENABLE_MPI:BOOL=OFF"
|
options.extend(
|
||||||
|
[
|
||||||
|
define("TPL_ENABLE_MPI", False),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DSEACASProj_ENABLE_TESTS:BOOL=ON",
|
define(project_name_base + "_ENABLE_TESTS", True),
|
||||||
"-DSEACASProj_ENABLE_CXX11:BOOL=ON",
|
define(project_name_base + "_ENABLE_CXX11", True),
|
||||||
from_variant("CMAKE_INSTALL_RPATH_USE_LINK_PATH", "shared"),
|
define(project_name_base + "_ENABLE_Kokkos", False),
|
||||||
from_variant("BUILD_SHARED_LIBS", "shared"),
|
define(project_name_base + "_HIDE_DEPRECATED_CODE", False),
|
||||||
"-DSEACASProj_ENABLE_Kokkos:BOOL=OFF",
|
from_variant(project_name_base + "_ENABLE_Fortran", "fortran"),
|
||||||
"-DSEACASProj_HIDE_DEPRECATED_CODE:BOOL=OFF",
|
|
||||||
from_variant("SEACASExodus_ENABLE_THREADSAFE", "thread_safe"),
|
|
||||||
from_variant("SEACASIoss_ENABLE_THREADSAFE", "thread_safe"),
|
|
||||||
from_variant("SEACASProj_ENABLE_Fortran", "fortran"),
|
|
||||||
from_variant("TPL_ENABLE_X11", "x11"),
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -203,67 +221,68 @@ def cmake_args(self):
|
|||||||
if "+applications" in spec and "+legacy" in spec:
|
if "+applications" in spec and "+legacy" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DSEACASProj_ENABLE_ALL_PACKAGES:BOOL=ON",
|
define(project_name_base + "_ENABLE_ALL_PACKAGES", True),
|
||||||
"-DSEACASProj_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=ON",
|
define(project_name_base + "_ENABLE_ALL_OPTIONAL_PACKAGES", True),
|
||||||
"-DSEACASProj_ENABLE_SECONDARY_TESTED_CODE:BOOL=ON",
|
define(project_name_base + "_ENABLE_SECONDARY_TESTED_CODE", True),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Don't want everything; handle the subsets:
|
# Don't want everything; handle the subsets:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DSEACASProj_ENABLE_ALL_PACKAGES:BOOL=OFF",
|
define(project_name_base + "_ENABLE_ALL_PACKAGES", False),
|
||||||
"-DSEACASProj_ENABLE_ALL_OPTIONAL_PACKAGES:BOOL=OFF",
|
define(project_name_base + "_ENABLE_ALL_OPTIONAL_PACKAGES", False),
|
||||||
"-DSEACASProj_ENABLE_SECONDARY_TESTED_CODE:BOOL=OFF",
|
define(project_name_base + "_ENABLE_SECONDARY_TESTED_CODE", False),
|
||||||
"-DSEACASProj_ENABLE_SEACASIoss:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASIoss", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASExodus:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASExodus", True),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASExodus_for", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASExodus_for", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASExoIIv2for32", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASExoIIv2for32", "fortran"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
if "+applications" in spec:
|
if "+applications" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DSEACASProj_ENABLE_SEACASAprepro:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASAprepro", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASAprepro_lib:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASAprepro_lib", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASConjoin:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASConjoin", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASCpup:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASCpup", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASEjoin:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASEjoin", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASEpu:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASEpu", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASExo2mat:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASExo2mat", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASExo_format:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASExo_format", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASExodiff:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASExodiff", True),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASExplore", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASExplore", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASGrepos", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASGrepos", "fortran"),
|
||||||
"-DSEACASProj_ENABLE_SEACASMat2exo:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASMat2exo", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASNas2exo:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASNas2exo", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASNemslice:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASNemslice", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASNemspread:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASNemspread", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASSlice:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASSlice", True),
|
||||||
"-DSEACASProj_ENABLE_SEACASZellij:BOOL=ON",
|
define(project_name_base + "_ENABLE_SEACASZellij", True),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
if "+legacy" in spec:
|
if "+legacy" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
define("SEACASProj_ENABLE_SEACASNemesis", True),
|
define(project_name_base + "_ENABLE_SEACASNemesis", True),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASAlgebra", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASAlgebra", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASBlot", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASBlot", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASEx1ex2v2", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASEx1ex2v2", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASEx2ex1v2", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASEx2ex1v2", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASExomatlab", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASExomatlab", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASExotec2", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASExotec2", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASExotxt", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASExotxt", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASFastq", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASFastq", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASGen3D", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASGen3D", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASGenshell", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASGenshell", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASGjoin", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASGjoin", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASMapvar", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASMapvar", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASMapvar-kd", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASMapvar-kd", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASNumbers", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASNumbers", "fortran"),
|
||||||
from_variant("SEACASProj_ENABLE_SEACASTxtexo", "fortran"),
|
from_variant(project_name_base + "_ENABLE_SEACASTxtexo", "fortran"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -271,7 +290,7 @@ def cmake_args(self):
|
|||||||
# Always need NetCDF-C
|
# Always need NetCDF-C
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DTPL_ENABLE_Netcdf:BOOL=ON",
|
define("TPL_ENABLE_Netcdf", True),
|
||||||
"-DNetCDF_ROOT:PATH=%s" % spec["netcdf-c"].prefix,
|
"-DNetCDF_ROOT:PATH=%s" % spec["netcdf-c"].prefix,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -279,11 +298,11 @@ def cmake_args(self):
|
|||||||
if "+parmetis" in spec:
|
if "+parmetis" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DTPL_ENABLE_METIS:BOOL=ON",
|
define("TPL_ENABLE_METIS", True),
|
||||||
"-DMETIS_LIBRARY_DIRS=%s" % spec["metis"].prefix.lib,
|
"-DMETIS_LIBRARY_DIRS=%s" % spec["metis"].prefix.lib,
|
||||||
"-DMETIS_LIBRARY_NAMES=metis",
|
"-DMETIS_LIBRARY_NAMES=metis",
|
||||||
"-DTPL_METIS_INCLUDE_DIRS=%s" % spec["metis"].prefix.include,
|
"-DTPL_METIS_INCLUDE_DIRS=%s" % spec["metis"].prefix.include,
|
||||||
"-DTPL_ENABLE_ParMETIS:BOOL=ON",
|
define("TPL_ENABLE_ParMETIS", True),
|
||||||
"-DParMETIS_LIBRARY_DIRS=%s;%s"
|
"-DParMETIS_LIBRARY_DIRS=%s;%s"
|
||||||
% (spec["parmetis"].prefix.lib, spec["metis"].prefix.lib),
|
% (spec["parmetis"].prefix.lib, spec["metis"].prefix.lib),
|
||||||
"-DParMETIS_LIBRARY_NAMES=parmetis;metis",
|
"-DParMETIS_LIBRARY_NAMES=parmetis;metis",
|
||||||
@ -294,37 +313,48 @@ def cmake_args(self):
|
|||||||
elif "+metis" in spec:
|
elif "+metis" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DTPL_ENABLE_METIS:BOOL=ON",
|
define("TPL_ENABLE_METIS", True),
|
||||||
"-DMETIS_LIBRARY_DIRS=%s" % spec["metis"].prefix.lib,
|
"-DMETIS_LIBRARY_DIRS=%s" % spec["metis"].prefix.lib,
|
||||||
"-DMETIS_LIBRARY_NAMES=metis",
|
"-DMETIS_LIBRARY_NAMES=metis",
|
||||||
"-DTPL_METIS_INCLUDE_DIRS=%s" % spec["metis"].prefix.include,
|
"-DTPL_METIS_INCLUDE_DIRS=%s" % spec["metis"].prefix.include,
|
||||||
"-DTPL_ENABLE_ParMETIS:BOOL=OFF",
|
define("TPL_ENABLE_ParMETIS", False),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DTPL_ENABLE_METIS:BOOL=OFF",
|
define("TPL_ENABLE_METIS", False),
|
||||||
"-DTPL_ENABLE_ParMETIS:BOOL=OFF",
|
define("TPL_ENABLE_ParMETIS", False),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
if "+matio" in spec:
|
if "+matio" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
["-DTPL_ENABLE_Matio:BOOL=ON", "-DMatio_ROOT:PATH=%s" % spec["matio"].prefix]
|
[
|
||||||
|
define("TPL_ENABLE_Matio", True),
|
||||||
|
"-DMatio_ROOT:PATH=%s" % spec["matio"].prefix,
|
||||||
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
options.extend(["-DTPL_ENABLE_Matio:BOOL=OFF"])
|
options.extend(
|
||||||
|
[
|
||||||
|
define("TPL_ENABLE_Matio", False),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
if "+cgns" in spec:
|
if "+cgns" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DTPL_ENABLE_CGNS:BOOL=ON",
|
define("TPL_ENABLE_CGNS", True),
|
||||||
"-DCGNS_ROOT:PATH=%s" % spec["cgns"].prefix,
|
"-DCGNS_ROOT:PATH=%s" % spec["cgns"].prefix,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
options.extend(["-DTPL_ENABLE_CGNS:BOOL=OFF"])
|
options.extend(
|
||||||
|
[
|
||||||
|
define("TPL_ENABLE_CGNS", False),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
options.append(from_variant("TPL_ENABLE_Faodel", "faodel"))
|
options.append(from_variant("TPL_ENABLE_Faodel", "faodel"))
|
||||||
|
|
||||||
@ -335,12 +365,16 @@ def cmake_args(self):
|
|||||||
if "+adios2" in spec:
|
if "+adios2" in spec:
|
||||||
options.extend(
|
options.extend(
|
||||||
[
|
[
|
||||||
"-DTPL_ENABLE_ADIOS2:BOOL=ON",
|
define("TPL_ENABLE_ADIOS2", True),
|
||||||
"-DADIOS2_ROOT:PATH=%s" % spec["adios2"].prefix,
|
"-DADIOS2_ROOT:PATH=%s" % spec["adios2"].prefix,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
options.extend(["-DTPL_ENABLE_ADIOS2:BOOL=OFF"])
|
options.extend(
|
||||||
|
[
|
||||||
|
define("TPL_ENABLE_ADIOS2", False),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
# ################# RPath Handling ######################
|
# ################# RPath Handling ######################
|
||||||
if sys.platform == "darwin" and macos_version() >= Version("10.12"):
|
if sys.platform == "darwin" and macos_version() >= Version("10.12"):
|
||||||
|
Loading…
Reference in New Issue
Block a user