more missing includes for MPI without wrapper

This commit is contained in:
Dan Ibanez 2021-01-19 10:33:08 -07:00
parent 69182dc438
commit 9ad3e49371
3 changed files with 10 additions and 2 deletions

View File

@ -818,7 +818,7 @@ IF(USE_HDF5)
ENDIF(NOT HAVE_HDF5_H)
# Check to ensure that HDF5 was built with zlib.
set (CMAKE_REQUIRED_INCLUDES ${HAVE_HDF5_H})
set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} "${HAVE_HDF5_H}")
CHECK_C_SOURCE_COMPILES("#include <H5public.h>
#if !H5_HAVE_ZLIB_H
#error
@ -1614,7 +1614,7 @@ set(dest "${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c")
# it cannot be generated and an error should be thrown.
IF(NOT HAVE_M4)
IF(NOT EXISTS ${dest})
MESSAGE(FATAL_ERROR "m4 is required to generate ${filename}.c. Please install m4 so that it is on the PATH and try again.")
MESSAGE(FATAL_ERROR "m4 is required to generate ${dest}. Please install m4 so that it is on the PATH and try again.")
ENDIF()
ENDIF(NOT HAVE_M4)

View File

@ -43,6 +43,10 @@ ENDFOREACH()
ADD_LIBRARY(netcdf nc_initialize.c ${LARGS} )
IF(MPI_C_INCLUDE_PATH)
target_include_directories(netcdf PUBLIC ${MPI_C_INCLUDE_PATH})
ENDIF(MPI_C_INCLUDE_PATH)
IF(MOD_NETCDF_NAME)
SET_TARGET_PROPERTIES(netcdf PROPERTIES LIBRARY_OUTPUT_NAME ${NETCDF_LIB_NAME})
SET_TARGET_PROPERTIES(netcdf PROPERTIES ARCHIVE_OUTPUT_NAME ${NETCDF_LIB_NAME})

View File

@ -56,6 +56,10 @@ ENDIF()
# the netCDF library.
add_library(nczarr OBJECT ${libnczarr_SOURCES})
IF(MPI_C_INCLUDE_PATH)
target_include_directories(nczarr PUBLIC ${MPI_C_INCLUDE_PATH})
ENDIF(MPI_C_INCLUDE_PATH)
IF(ENABLE_S3_SDK)
IF(NOT MSVC)
target_compile_features(nczarr PUBLIC cxx_std_11)