Skip to content

Commit

Permalink
Add CABLE package.py file
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanBryan51 committed Mar 7, 2024
1 parent e57dc31 commit cb63a93
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions packages/cable/package.py
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

0 comments on commit cb63a93

Please sign in to comment.