Skip to content

Commit

Permalink
Merge pull request ESCOMP#167 from jedwards4b/use_pio_env
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b authored Jun 2, 2022
2 parents 3d35554 + c8f0877 commit 78743b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ def buildlib(bldroot, libroot, case):
cmake_flags += " -DLIBROOT={} ".format(libroot)
cmake_flags += " -DMPILIB={} ".format(mpilib)
cmake_flags += " -DSRCROOT={} ".format(case.get_value("SRCROOT"))
cmake_flags += " -DPIO_C_LIBRARY={path}/lib -DPIO_C_INCLUDE_DIR={path}/include ".format(path=os.path.join(case.get_value("EXEROOT"),sharedpath))
cmake_flags += " -DPIO_Fortran_LIBRARY={path}/lib -DPIO_Fortran_INCLUDE_DIR={path}/include ".format(path=os.path.join(case.get_value("EXEROOT"),sharedpath))
if os.environ["PIO_LIBDIR"]:
cmake_flags += " -DPIO_C_LIBRARY={libdir} -DPIO_C_INCLUDE_DIR={incdir} ".format(libdir=os.environ["PIO_LIBDIR"], incdir=os.environ["PIO_INCDIR"])
cmake_flags += " -DPIO_Fortran_LIBRARY={libdir} -DPIO_Fortran_INCLUDE_DIR={incdir} ".format(libdir=os.environ["PIO_LIBDIR"], incdir=os.environ["PIO_INCDIR"])
else:
cmake_flags += " -DPIO_C_LIBRARY={path}/lib -DPIO_C_INCLUDE_DIR={path}/include ".format(path=os.path.join(case.get_value("EXEROOT"),sharedpath))
cmake_flags += " -DPIO_Fortran_LIBRARY={path}/lib -DPIO_Fortran_INCLUDE_DIR={path}/include ".format(path=os.path.join(case.get_value("EXEROOT"),sharedpath))
cmake_flags += srcpath
all_src_files = list(all_files_under(srcpath, ignoredirs=[".git","cmake","test",".github","cime_config","fox"]))
# Search SourceMods path for CDEPS files. We only look in the data component directories for these, files in cdeps share
Expand Down

0 comments on commit 78743b2

Please sign in to comment.