diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 19b0a043998..1b76351a681 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,8 +46,4 @@ if (PIO_ENABLE_FORTRAN) set(FPPFLAGS ${FPPFLAGS} PARENT_SCOPE) endif () -# Build the netCDF integration layer if desired. -if (PIO_ENABLE_NETCDF_INTEGRATION) - add_subdirectory (ncint) -endif () diff --git a/src/ncint/CMakeLists.txt b/src/ncint/CMakeLists.txt deleted file mode 100644 index 2344f93bf84..00000000000 --- a/src/ncint/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ -cmake_minimum_required (VERSION 2.8.12) - -# add_library(ncint nc_get_vard.c ncintdispatch.c ncint_pio.c nc_put_vard.c) - -# # set up include-directories -# include_directories( -# "${CMAKE_BINARY_DIR}" -# "${PROJECT_SOURCE_DIR}" # to find foo/foo.h -# "${PROJECT_BINARY_DIR}") # to find foo/config.h - -# # Include the clib source directory -# target_include_directories (ncint -# PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../clib) - -# # Include the ncint source directory -# target_include_directories (ncint -# PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - -# #===== NetCDF-C ===== -# find_package (NetCDF "4.3.3" COMPONENTS C) -# if (NetCDF_C_FOUND) -# target_include_directories (ncint -# PUBLIC ${NetCDF_C_INCLUDE_DIRS}) -# target_compile_definitions (ncint -# PUBLIC _NETCDF) -# target_link_libraries (ncint -# PUBLIC ${NetCDF_C_LIBRARIES}) -# if (${NetCDF_C_HAS_PARALLEL}) -# target_compile_definitions (ncint -# PUBLIC _NETCDF4) -# endif () -# if (${NetCDF_C_LOGGING_ENABLED}) -# target_compile_definitions (ncint -# PUBLIC NETCDF_C_LOGGING_ENABLED) -# # netcdf.h needs this to be defined to use netCDF logging. -# target_compile_definitions (ncint -# PUBLIC LOGGING) -# endif() -# else () -# target_compile_definitions (ncint -# PUBLIC _NONETCDF) -# endif () - - - diff --git a/tests/ncint/CMakeLists.txt b/tests/ncint/CMakeLists.txt new file mode 100644 index 00000000000..a9fc3fda92b --- /dev/null +++ b/tests/ncint/CMakeLists.txt @@ -0,0 +1,35 @@ +include (LibMPI) + +include_directories("${CMAKE_SOURCE_DIR}/tests/ncint") +include_directories("${CMAKE_BINARY_DIR}") + +#============================================================================== +# PREPARE FOR TESTING +#============================================================================== + +# Don't run these tests if we are using MPI SERIAL. +add_executable (tst_pio_udf EXCLUDE_FROM_ALL tst_pio_udf.c) +add_dependencies (tests tst_pio_udf) +target_link_libraries (tst_pio_udf pioc) + +# Test Timeout in seconds. +if (PIO_VALGRIND_CHECK) + set (DEFAULT_TEST_TIMEOUT 480) +else () + set (DEFAULT_TEST_TIMEOUT 240) +endif () + +# All tests need a certain number of tasks, but they should be able to +# run successfully with more than they need. Test this by providing an +# extra processor for each C test. +set (AT_LEAST_TWO_TASKS 3) +set (AT_LEAST_THREE_TASKS 4) +set (AT_LEAST_FOUR_TASKS 5) +set (AT_LEAST_EIGHT_TASKS 9) +set (EXACTLY_FOUR_TASKS 4) + +add_mpi_test(tst_pio_udf + EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/tst_pio_udf + NUMPROCS ${AT_LEAST_FOUR_TASKS} + TIMEOUT ${DEFAULT_TEST_TIMEOUT}) +