Skip to content

Commit

Permalink
more work on ncint in cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 19, 2020
1 parent 6bd5fa4 commit 444f023
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 49 deletions.
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

45 changes: 0 additions & 45 deletions src/ncint/CMakeLists.txt

This file was deleted.

35 changes: 35 additions & 0 deletions tests/ncint/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})

0 comments on commit 444f023

Please sign in to comment.