eckit: fix underlinking (#33739)

This commit is contained in:
Sergey Kosukhin 2022-11-07 20:54:36 +01:00 committed by GitHub
parent cc84ab1e92
commit 01a5788517
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,4 +137,12 @@ def cmake_args(self):
# (the LAPACK backend is still built though): # (the LAPACK backend is still built though):
args.append(self.define("ENABLE_LAPACK", "linalg=lapack" in self.spec)) args.append(self.define("ENABLE_LAPACK", "linalg=lapack" in self.spec))
if "+admin" in self.spec and "+termlib" in self.spec["ncurses"]:
# Make sure that libeckit_cmd is linked to a library that resolves 'setupterm',
# 'tputs', etc. That is either libncurses (when 'ncurses~termlib') or libtinfo (when
# 'ncurses+termlib'). CMake considers the latter only if CURSES_NEED_NCURSES is set to
# TRUE. Note that the installation of eckit does not fail without this but the building
# of a dependent package (e.g. fdb) might fail due to the undefined references.
args.append(self.define("CURSES_NEED_NCURSES", True))
return args return args