Skip to content

Commit

Permalink
Remove explicit setting of the compiler
Browse files Browse the repository at this point in the history
This change was tested with cable @git.215-additional-cmake-changes.
  • Loading branch information
SeanBryan51 committed Mar 7, 2024
1 parent be79752 commit 218d96c
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions packages/cable/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def url_for_version(self, version):

variant(
"mpi",
default=False,
default=True,
description="Build MPI executable.",
)
variant(
Expand All @@ -41,19 +41,5 @@ def url_for_version(self, version):
def cmake_args(self):
args = []
if self.spec.satisfies("+mpi"):
args += [
self.define_from_variant("CABLE_MPI", "mpi"),
# TODO(Sean): we should let CMake find the MPI compiler instead
# of specifying it explicitly. However, this requires adding
# find_package(MPI) to the CMakeLists.txt file. This was not
# done in https://github.com/CABLE-LSM/CABLE/pull/200 so that
# we can demonstrate binary equivalence in the executables when
# transitioning from a Makefile based to a CMake based build
# system. Once find_package(MPI) is added, this file should be
# updated.
self.define(
"CMAKE_Fortran_COMPILER",
self.spec["mpi"].mpifc,
),
]
args.append(self.define_from_variant("CABLE_MPI", "mpi"))
return args

0 comments on commit 218d96c

Please sign in to comment.