File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,9 @@ endif()
483483
484484# Find this first in case we need to use pnetcdf's netCDF
485485# Priority is given to pnetcdf due to performance
486- find_package ( PnetCDF QUIET )
486+ if ( ${USE_MPI} )
487+ find_package ( PnetCDF QUIET )
488+ endif ()
487489
488490# Included is a lightweight finder, but we really should switch to using UniData's netCDF cmake config
489491# The reason these are two separate and not COMPONENTS of one larger package is because that is the way UniData
@@ -723,6 +725,13 @@ else()
723725 list ( APPEND PROJECT_COMPILE_DEFINITIONS_OPTIONS WRF_USE_CLM )
724726endif ()
725727
728+ if ( ${PnetCDF_FOUND} )
729+ list ( APPEND PROJECT_COMPILE_DEFINITIONS_OPTIONS PNETCDF )
730+ endif ()
731+ if ( ${ENABLE_PNETCDF_QUILT} )
732+ list ( APPEND PROJECT_COMPILE_DEFINITIONS_OPTIONS PNETCDF_QUILT=1 )
733+ endif ()
734+
726735# If force classic or no nc-4 support enable classic
727736if ( ${FORCE_NETCDF_CLASSIC} OR ( NOT ${netCDF_HAS_NC4} ) )
728737 list ( APPEND PROJECT_COMPILE_DEFINITIONS_OPTIONS NETCDF_classic=1 )
Original file line number Diff line number Diff line change @@ -105,7 +105,6 @@ find_package_handle_standard_args(
105105
106106if ( PnetCDF_FOUND AND NOT TARGET PnetCDF::pnetcdf )
107107 if ( ${PnetCDF_HAS_NETCDF4} )
108- message ( STATUS "Will try to find netCDF from PnetCDF ldflags..." )
109108 list ( APPEND CMAKE_MESSAGE_INDENT " " )
110109 if ( NOT "${PnetCDF_LDFLAGS} " STREQUAL "" )
111110 # Find prefix
You can’t perform that action at this time.
0 commit comments