Skip to content

Commit cf67af5

Browse files
Merge pull request #637 from E3SM-Project/jayeshkrishna/add_defns_for_external_gptl
Adding MPI decls for external GPTL
2 parents 8b02d4f + 80f0f4a commit cf67af5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/clib/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ if (PIO_ENABLE_TIMING)
6868
PUBLIC ${GPTL_C_INCLUDE_DIRS})
6969
target_link_libraries (pioc
7070
PUBLIC ${GPTL_C_LIBRARIES})
71+
72+
# GPTL expects HAVE_MPI, if MPI is available, when using GPTL header files
73+
if (NOT PIO_USE_MPISERIAL)
74+
target_compile_definitions (pioc PUBLIC HAVE_MPI)
75+
endif ()
7176
else ()
7277
message (STATUS "Using internal GPTL C library for timing")
7378
target_include_directories (pioc

0 commit comments

Comments
 (0)