Skip to content

Commit 704e3e3

Browse files
committed
Added a CMake option to force CESM to always build yaml-cpp, vs using FindPackage. This addresses a build issue when Conda environments are active and find it in their search path.
1 parent 3a164a8 commit 704e3e3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cime_config/buildlib

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ def _build_tuvx(caseroot, libroot, bldroot):
218218
cmake_args += "-DCMAKE_Fortran_COMPILER_WORKS=1 "
219219
cmake_args += "-DCMAKE_C_COMPILER_WORKS=1 "
220220
cmake_args += "-DCMAKE_CXX_COMPILER_WORKS=1 "
221+
cmake_args += "-DCMAKE_DISABLE_FIND_PACKAGE_yaml-cpp=1 "
221222
if (case.get_value("MACH") == "izumi") :
222223
cmake_args += f"-DCMAKE_PREFIX_PATH={arg_dict['NETCDF_PATH']} "
223224
cmake_args += f"-DCMAKE_IGNORE_PATH={os.environ.get('PYTHONHOME')} "
@@ -241,8 +242,9 @@ def _build_tuvx(caseroot, libroot, bldroot):
241242
incldir = os.environ.get('USER_INCLDIR')
242243
if incldir is None:
243244
incldir = ''
244-
os.environ['USER_INCLDIR'] = incldir + \
245-
f" -I{_tuvx_include_dir(libroot)} "
245+
#os.environ['USER_INCLDIR'] = incldir + \
246+
# f" -I{_tuvx_include_dir(libroot)} "
247+
os.environ['USER_INCLDIR'] = f" -I{_tuvx_include_dir(libroot)} " + incldir
246248

247249
# create symlink to library in folder CIME expects libraries to be in
248250
dst = os.path.join(libroot, "libtuvx.a")

0 commit comments

Comments
 (0)