scotch: add new variants + bison version min. (#37958)

This commit is contained in:
Cameron Book 2023-06-26 05:55:21 -07:00 committed by GitHub
parent 0314071763
commit 1949f67a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,8 @@ class Scotch(CMakePackage, MakefilePackage):
version("5.1.10b", sha256="54c9e7fafefd49d8b2017d179d4f11a655abe10365961583baaddc4eeb6a9add") version("5.1.10b", sha256="54c9e7fafefd49d8b2017d179d4f11a655abe10365961583baaddc4eeb6a9add")
build_system(conditional("cmake", when="@7:"), "makefile", default="cmake") build_system(conditional("cmake", when="@7:"), "makefile", default="cmake")
variant("threads", default=True, description="use POSIX Pthreads within Scotch and PT-Scotch")
variant("mpi_thread", default=False, description="use multi-threaded algorithms")
variant("mpi", default=True, description="Compile parallel libraries") variant("mpi", default=True, description="Compile parallel libraries")
variant("compression", default=True, description="May use compressed files") variant("compression", default=True, description="May use compressed files")
variant("esmumps", default=False, description="Compile esmumps (needed by mumps)") variant("esmumps", default=False, description="Compile esmumps (needed by mumps)")
@ -54,7 +56,7 @@ class Scotch(CMakePackage, MakefilePackage):
# Does not build with flex 2.6.[23] # Does not build with flex 2.6.[23]
depends_on("flex@:2.6.1,2.6.4:", type="build") depends_on("flex@:2.6.1,2.6.4:", type="build")
depends_on("bison", type="build") depends_on("bison@3.4:", type="build")
depends_on("mpi", when="+mpi") depends_on("mpi", when="+mpi")
depends_on("zlib", when="+compression") depends_on("zlib", when="+compression")
@ -115,10 +117,10 @@ def cmake_args(self):
self.define_from_variant("BUILD_LIBESMUMPS", "esmumps"), self.define_from_variant("BUILD_LIBESMUMPS", "esmumps"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("BUILD_SHARED_LIBS", "shared"),
self.define_from_variant("BUILD_PTSCOTCH", "mpi"), self.define_from_variant("BUILD_PTSCOTCH", "mpi"),
self.define_from_variant("THREADS", "threads"),
self.define_from_variant("MPI_THREAD_MULTIPLE", "mpi_thread"),
] ]
# TODO should we enable/disable THREADS?
if "+int64" in spec: if "+int64" in spec:
args.append("-DINTSIZE=64") args.append("-DINTSIZE=64")