Ensure MPI header found without wrapper

This commit is contained in:
Dan Ibanez 2021-01-19 09:38:07 -07:00
parent af8fd51a37
commit 69182dc438
3 changed files with 12 additions and 0 deletions

View File

@ -19,5 +19,9 @@ ENDIF()
# the netCDF library.
add_library(netcdfhdf5 OBJECT ${libnchdf5_SOURCES})
IF(MPI_C_INCLUDE_PATH)
target_include_directories(netcdfhdf5 PUBLIC ${MPI_C_INCLUDE_PATH})
ENDIF(MPI_C_INCLUDE_PATH)
# Remember to package this file for CMake builds.
ADD_EXTRA_DIST(${libnchdf5_SOURCES} CMakeLists.txt)

View File

@ -33,6 +33,10 @@ ENDIF(ENABLE_BYTERANGE)
add_library(netcdf3 OBJECT ${libsrc_SOURCES})
IF(MPI_C_INCLUDE_PATH)
target_include_directories(netcdf3 PUBLIC ${MPI_C_INCLUDE_PATH})
ENDIF(MPI_C_INCLUDE_PATH)
# The C API man page.
SET(MAN_FILES netcdf.3)

View File

@ -12,6 +12,10 @@ ncindex.c nc4cache.c)
add_library(netcdf4 OBJECT ${libsrc4_SOURCES})
IF(MPI_C_INCLUDE_PATH)
target_include_directories(netcdf4 PUBLIC ${MPI_C_INCLUDE_PATH})
ENDIF(MPI_C_INCLUDE_PATH)
# Files for make dist
FILE(GLOB libsrc4_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
SET(CUR_EXTRA_DIST CMakeLists.txt Makefile.am)