Skip to content

Commit

Permalink
dealing with option USE_G2C_API
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Dec 31, 2024
1 parent eda669d commit 0a517ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ else()
find_package(g2c REQUIRED)
endif()

# Set a pre-processor symbol if we are using g2c API.
if (USE_G2C_API)
add_definitions(-DG2C_API)
endif()

# Figure whether user wants a _4, a _d, or both libraries.
if(BUILD_4 AND BUILD_D)
set(kinds "4" "d")
Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ g2grids.F90 g2get.F90 g2getgb2.F90 g2index.F90 g2gf.F90 g2unpack.F90
g2create.F90 ${CMAKE_CURRENT_BINARY_DIR}/gribmod.F90 gridtemplates.F90
intmath.F90 g2jpc.F90 pack_gp.f params_ecmwf.F90 params.F90
pdstemplates.F90 g2png.F90 realloc.F90 reduce.f g2sim.F90 skgb.F90
g2spec.F90 g2logging.F90 g2cf.F90 g2c_interface.F90)
g2spec.F90 g2logging.F90)

# Add the G2C API code if required.
if (USE_G2C_API)
set(fortran_src ${fortran_src} g2cf.F90 g2c_interface.F90)
endif()

# This function calls NCEPLIBS-w3emc.
if (BUILD_WITH_W3EMC)
Expand Down

0 comments on commit 0a517ae

Please sign in to comment.