FleCSPH: update package (#37888)

Co-authored-by: Richard Berger <richard.berger@outlook.com>
This commit is contained in:
Julien Loiseau 2023-07-18 15:06:36 -06:00 committed by GitHub
parent 9a05dce3bf
commit 64361e1fc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
from spack.pkg.builtin.boost import Boost
class Flecsph(CMakePackage):
@ -15,37 +14,32 @@ class Flecsph(CMakePackage):
includes support for gravitational forces using the fast multipole method
(FMM)."""
homepage = "http://flecsi.lanl.com"
homepage = "http://flecsi.org"
git = "https://github.com/laristra/flecsph.git"
maintainers("JulienLoiseau")
version("master", branch="master", submodules=True, preferred=True)
variant("test", default=True, description="Adding tests")
variant("debug_tree", default=False, description="Enable debug for Ntree")
depends_on("cmake@3.15:", type="build")
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants)
depends_on("boost@1.70.0: cxxstd=17 +program_options")
depends_on("boost@1.70.0: +atomic +filesystem +regex +system")
depends_on("mpi")
depends_on("hdf5+hl@1.8:")
depends_on("flecsi@1.4.2 +external_cinch backend=mpi")
depends_on("flecsi@2.2 +flog backend=mpi")
depends_on("gsl")
depends_on("googletest", when="+test")
depends_on("googletest", type="test")
depends_on("pkgconfig", type="build")
def setup_run_environment(self, env):
env.set("HDF5_ROOT", self.spec["hdf5"].prefix)
def cmake_args(self):
options = ["-DCMAKE_BUILD_TYPE=debug"]
options.append("-DENABLE_UNIT_TESTS=ON")
options.append("-DENABLE_DEBUG=OFF")
options.append("-DLOG_STRIP_LEVEL=1")
options.append("-DENABLE_UNIT_TESTS=ON")
options.append("-DENABLE_DEBUG_TREE=OFF")
# add option to build the tests
options = [
self.define("LOG_STRIP_LEVEL", True),
self.define("ENABLE_UNIT_TESTS", self.run_tests),
self.define_from_variant("ENABLE_DEBUG_TREE", "debug_tree"),
self.define_from_variant("ENABLE_DEBUG", "debug_tree"),
]
return options