summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Berger <rberger@lanl.gov>2024-08-05 13:48:58 -0600
committerGitHub <noreply@github.com>2024-08-05 21:48:58 +0200
commit83efafa09f0b84357cac4b5009737e9415c484b1 (patch)
treef3d0938db2968445818c3b4d67de1a67949e22cd
parent5f29bb9b2298c0b694aebdb8953dc76adaea1c5f (diff)
downloadspack-83efafa09f0b84357cac4b5009737e9415c484b1.tar.gz
spack-83efafa09f0b84357cac4b5009737e9415c484b1.tar.bz2
spack-83efafa09f0b84357cac4b5009737e9415c484b1.tar.xz
spack-83efafa09f0b84357cac4b5009737e9415c484b1.zip
Add language depends_on on several packages (#45298)
-rw-r--r--var/spack/repos/builtin/packages/flecsi/package.py5
-rw-r--r--var/spack/repos/builtin/packages/lammps-example-plugin/package.py4
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py14
-rw-r--r--var/spack/repos/builtin/packages/ports-of-call/package.py3
-rw-r--r--var/spack/repos/builtin/packages/singularity-eos/package.py7
-rw-r--r--var/spack/repos/builtin/packages/spiner/package.py3
6 files changed, 23 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/flecsi/package.py b/var/spack/repos/builtin/packages/flecsi/package.py
index 12d6d9df81..c18adb8233 100644
--- a/var/spack/repos/builtin/packages/flecsi/package.py
+++ b/var/spack/repos/builtin/packages/flecsi/package.py
@@ -28,8 +28,6 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
version("2.1.0", tag="v2.1.0", commit="533df139c267e2a93c268dfe68f9aec55de11cf0")
version("2.0.0", tag="v2.0.0", commit="5ceebadf75d1c98999ea9e9446926722d061ec22")
- depends_on("cxx", type="build") # generated
-
variant(
"backend",
default="mpi",
@@ -52,6 +50,9 @@ class Flecsi(CMakePackage, CudaPackage, ROCmPackage):
variant("kokkos", default=False, description="Enable Kokkos Support")
variant("openmp", default=False, description="Enable OpenMP Support")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+
# All Current FleCSI Releases
for level in ("low", "medium", "high"):
depends_on("caliper@:2.5,2.8:", when=f"caliper_detail={level}")
diff --git a/var/spack/repos/builtin/packages/lammps-example-plugin/package.py b/var/spack/repos/builtin/packages/lammps-example-plugin/package.py
index 729b29f732..e82a8d4a47 100644
--- a/var/spack/repos/builtin/packages/lammps-example-plugin/package.py
+++ b/var/spack/repos/builtin/packages/lammps-example-plugin/package.py
@@ -43,9 +43,7 @@ class LammpsExamplePlugin(CMakePackage):
preferred=True,
)
- depends_on("c", type="build") # generated
- depends_on("cxx", type="build") # generated
- depends_on("fortran", type="build") # generated
+ depends_on("cxx", type="build")
def url_for_version(self, version):
split_ver = str(version).split(".")
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index 0be3ed6daa..663adedcbd 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -369,9 +369,15 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
deprecated=True,
)
- depends_on("c", type="build") # generated
- depends_on("cxx", type="build") # generated
- depends_on("fortran", type="build") # generated
+ depends_on("cxx", type="build")
+
+ # mdi, scafacos, ml-quip, qmmm require C, but not available in Spack
+ for c_pkg in ("adios", "atc", "awpmd", "ml-pod", "electrode", "kim", "h5md", "tools"):
+ depends_on("c", type="build", when=f"+{c_pkg}")
+
+ # scafacos, ml-quip require Fortran, but not available in Spack
+ for fc_pkg in ("kim",):
+ depends_on("fortran", type="build", when=f"+{fc_pkg}")
stable_versions = {
"20230802.3",
@@ -602,6 +608,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
values=("double", "mixed", "single"),
multi=False,
)
+ variant("tools", default=False, description="Build LAMMPS tools (msi2lmp, binary2txt, chain)")
depends_on("cmake@3.16:", when="@20231121:")
depends_on("mpi", when="+mpi")
@@ -780,6 +787,7 @@ class Lammps(CMakePackage, CudaPackage, ROCmPackage, PythonExtension):
self.define_from_variant("LAMMPS_EXCEPTIONS", "exceptions"),
self.define_from_variant("{}_MPI".format(mpi_prefix), "mpi"),
self.define_from_variant("BUILD_OMP", "openmp"),
+ self.define_from_variant("BUILD_TOOLS", "tools"),
self.define("ENABLE_TESTING", self.run_tests),
self.define("DOWNLOAD_POTENTIALS", False),
]
diff --git a/var/spack/repos/builtin/packages/ports-of-call/package.py b/var/spack/repos/builtin/packages/ports-of-call/package.py
index d0ad83b84a..2ba749532b 100644
--- a/var/spack/repos/builtin/packages/ports-of-call/package.py
+++ b/var/spack/repos/builtin/packages/ports-of-call/package.py
@@ -34,7 +34,8 @@ class PortsOfCall(CMakePackage):
deprecated=True,
)
- depends_on("cxx", type="build") # generated
+ depends_on("c", type="build") # todo: disable cmake default?
+ depends_on("cxx", type="build")
variant(
"portability_strategy",
diff --git a/var/spack/repos/builtin/packages/singularity-eos/package.py b/var/spack/repos/builtin/packages/singularity-eos/package.py
index ac3fc6655e..ef5c571118 100644
--- a/var/spack/repos/builtin/packages/singularity-eos/package.py
+++ b/var/spack/repos/builtin/packages/singularity-eos/package.py
@@ -34,9 +34,6 @@ class SingularityEos(CMakePackage, CudaPackage):
deprecated=True,
)
- depends_on("cxx", type="build") # generated
- depends_on("fortran", type="build") # generated
-
# build with kokkos, kokkos-kernels for offloading support
variant("kokkos", default=False, description="Enable kokkos")
variant(
@@ -69,6 +66,10 @@ class SingularityEos(CMakePackage, CudaPackage):
variant("closure", default=True, description="Build closure module")
+ depends_on("c", type="build")
+ depends_on("cxx", type="build")
+ depends_on("fortran", type="build", when="+fortran")
+
# building/testing/docs
depends_on("cmake@3.19:", type="build")
depends_on("python@3:", when="+python")
diff --git a/var/spack/repos/builtin/packages/spiner/package.py b/var/spack/repos/builtin/packages/spiner/package.py
index 24e549ce77..7b065d482b 100644
--- a/var/spack/repos/builtin/packages/spiner/package.py
+++ b/var/spack/repos/builtin/packages/spiner/package.py
@@ -38,7 +38,8 @@ class Spiner(CMakePackage, CudaPackage):
deprecated=True,
)
- depends_on("cxx", type="build") # generated
+ depends_on("c", type="build") # todo: disable cmake default?
+ depends_on("cxx", type="build")
# When overriding/overloading varaints, the last variant is always used, except for
# "when" clauses. Therefore, call the whens FIRST then the non-whens.