Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CABLE spack package #60

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions packages/cable/package.py
SeanBryan51 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# Copyright 2022 ACCESS-NRI
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *

# See https://spack.readthedocs.io/en/latest/packaging_guide.html for a guide
# on how this file works.


class Cable(CMakePackage):
"""The CSIRO Atmosphere Biosphere Land Exchange (CABLE) model."""

homepage = "https://github.com/CABLE-LSM/CABLE"
git = "https://github.com/CABLE-LSM/CABLE.git"

maintainers("SeanBryan51")

version("main", branch="main")

def url_for_version(self, version):
return "https://github.com/CABLE-LSM/CABLE/tarball/{0}".format(version)

variant(
"mpi",
default=True,
description="Build MPI executable.",
)
variant(
"build_type",
default="Release",
description="CMake build type",
values=("Debug", "Release"),
)

depends_on("[email protected]:")
depends_on("mpi", when="+mpi")

def cmake_args(self):
args = []
if self.spec.satisfies("+mpi"):
args.append(self.define_from_variant("CABLE_MPI", "mpi"))
return args
Loading