Skip to content

Commit

Permalink
Merge pull request #1396 from billsacks/compiler_from_macros
Browse files Browse the repository at this point in the history
Get unit test build and run working with serial or parallel pFUnit
  • Loading branch information
jedwards4b authored Apr 21, 2017
2 parents ed29704 + efb7c60 commit 0cf7cbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ add_definitions(
-DNUM_COMP_INST_ESP=1
)

# The following definitions are needed when building with the mpi-serial library
if (USE_MPI_SERIAL)
add_definitions(-DNO_MPI2 -DNO_MPIMOD)
endif()

# Add source directories from stubs. This should be done first, so that in the
# case of name collisions, the drv versions take precedence (when there are two
# files with the same name, the one added later wins).
Expand Down Expand Up @@ -46,6 +51,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# tests need all of these libraries, but it's easiest just to set the same list
# for everyone.
set(DRV_UNIT_TEST_LIBS drv;csm_share;esmf_wrf_timemgr;mct;mpeu)
if (USE_MPI_SERIAL)
list(APPEND DRV_UNIT_TEST_LIBS mpi-serial)
endif()
list(APPEND DRV_UNIT_TEST_LIBS ${NETCDF_LIBRARIES})

# Add the test directories
Expand Down

0 comments on commit 0cf7cbb

Please sign in to comment.