Added fixes to CMake-based system, when building pnetcdf.

This commit is contained in:
Ward Fisher 2013-08-26 13:50:27 -06:00
parent a2186617bf
commit b6e4715104
5 changed files with 13 additions and 17 deletions

View File

@ -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)
# 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)

View File

@ -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

View File

@ -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)

View File

@ -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()

View File

@ -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)