mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Added fixes to CMake-based system, when building pnetcdf.
This commit is contained in:
parent
a2186617bf
commit
b6e4715104
@ -568,13 +568,14 @@ ENDIF()
|
||||
SET(STATUS_PARALLEL "OFF")
|
||||
OPTION(ENABLE_PARALLEL "Build netCDF-4 with parallel IO" OFF)
|
||||
IF(ENABLE_PARALLEL AND ENABLE_NETCDF_4)
|
||||
MESSAGE(STATUS "Debug: ${HDF5_LIB}")
|
||||
SET(USE_PARALLEL ON CACHE BOOL "")
|
||||
# Check for H5Pget_fapl_mpiposx, define USE_PARALLEL_POSIX
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_LIB} H5Pget_fapl_mpioposix "" USE_PARALLEL_POSIX)
|
||||
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_LIB} H5Pget_fapl_mpioposix "" USE_PARALLEL_POSIX)
|
||||
|
||||
# Else Check for H5Pget_fapl_mpio, define USE_PARALLEL_MPIO
|
||||
IF(NOT USE_PARALLEL_POSIX)
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_LIB} H5Pget_fapl_mpio "" USE_PARALLEL_MPIO)
|
||||
CHECK_LIBRARY_EXISTS(${HDF5_LIB} H5Pget_fapl_mpio "" USE_PARALLEL_MPIO)
|
||||
ENDIF()
|
||||
|
||||
IF(NOT USE_PARALLEL_POSIX AND NOT USE_PARALLEL_MPIO)
|
||||
|
@ -59,11 +59,6 @@ NCDAPTESTDIR = ncdap_test
|
||||
#endif # BUILD_UTILITIES
|
||||
endif
|
||||
|
||||
# Build libcdmr
|
||||
if BUILD_CDMREMOTE
|
||||
LIBCDMR = libcdmr
|
||||
endif
|
||||
|
||||
# Build pnetcdf
|
||||
if USE_PNETCDF
|
||||
LIBSRC5 = libsrc5
|
||||
|
@ -5,6 +5,6 @@ INCLUDE_DIRECTORIES(".")
|
||||
|
||||
SET(libsrc5_SOURCES nc5dispatch.c)
|
||||
|
||||
add_library(netcdf5 OBJECT ${libsrc_SOURCES})
|
||||
add_library(netcdf5 OBJECT ${libsrc5_SOURCES})
|
||||
|
||||
ADD_EXTRA_DIST(${libsrc5_SOURCES} CMakeLists.txt)
|
||||
ADD_EXTRA_DIST(${libsrc5_SOURCES} CMakeLists.txt)
|
||||
|
@ -22,6 +22,12 @@ IF(USE_NETCDF4)
|
||||
SET(TESTS ${TESTS} tst_atts)
|
||||
ENDIF()
|
||||
|
||||
IF(USE_PNETCDF)
|
||||
build_bin_test_no_prefix(tst_pnetcdf)
|
||||
build_bin_test_no_prefix(tst_parallel2)
|
||||
add_sh_test(nc_test run_pnetcdf_test)
|
||||
ENDIF()
|
||||
|
||||
IF(LARGE_FILE_TESTS)
|
||||
SET(TESTS ${TESTS} quick_large_files tst_big_var6 tst_big_var2 tst_big_rvar tst_big_var tst_large large_files)
|
||||
ENDIF()
|
||||
@ -64,4 +70,4 @@ FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
||||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
||||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} test_get.m4 test_put.m4 ref_tst_diskless2.cdl)
|
||||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|
||||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")
|
||||
|
@ -68,12 +68,6 @@ IF(TEST_PARALLEL)
|
||||
add_bin_test(nc_test4 tst_nc4perf)
|
||||
ENDIF()
|
||||
|
||||
IF(USE_PNETCDF)
|
||||
build_bin_test_no_prefix(tst_pnetcdf)
|
||||
build_bin_test_no_prefix(tst_parallel2)
|
||||
add_sh_test(nc_test4 run_pnetcdf_test)
|
||||
ENDIF()
|
||||
|
||||
## Specify files to be distributed by 'make dist'
|
||||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
|
||||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am)
|
||||
|
Loading…
Reference in New Issue
Block a user