CMakeLists.txt 1.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Add any dependencies that the cxx tests may need
# Note: The tests already depend on their own file
SET_PROPERTY(GLOBAL APPEND PROPERTY FORTRAN_TEST_DEPENDENCIES
  "XdmfUtils")

# Include XdmfTestDataGenerator from non-util tests
include_directories(${CMAKE_SOURCE_DIR}/tests/Fortran/)

# Include our test macros
include(AddTestsFortran)

# Add any cxx tests here:
# Note: We don't want to use a foreach loop to test the files incase we
#       have extra arguments (id: ADD_TEST_CXX(testname inputfile))
#       Read UseCxxTest.cmake for more information
# ---------------------------------------
if (MPIEXEC_MAX_NUMPROCS STRGREATER 5)
  get_filename_component(MPI_BIN_DIRECTORY ${MPI_C_COMPILER} PATH)
  EXECUTE_PROCESS(
20
    COMMAND ${MPIEXEC} --version
21 22 23
    OUTPUT_VARIABLE MPI_TYPE_OUTPUT
    ERROR_VARIABLE MPI_TYPE_ERROR
  )
24
  STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_ERROR}")
25 26 27 28 29
  IF ("${IS_OPENMPI}" STREQUAL "")
    ADD_MPI_TEST_FORTRAN(ConnectDSMFortran.sh AcceptDSMFortran,ConnectDSMFortran2,ConnectDSMFortran)
  ENDIF ("${IS_OPENMPI}" STREQUAL "")
endif(MPIEXEC_MAX_NUMPROCS STRGREATER 5)
ADD_TEST_FORTRAN(OutputTestXdmfFortran)
30
ADD_TEST_FORTRAN(EditTestXdmfFortran)
31
ADD_TEST_FORTRAN(TestXdmfFortran)
32
ADD_TEST_FORTRAN(NestedInfoFortran)
33
SET_SOURCE_FILES_PROPERTIES(FixedOutputTestXdmfFortran.f90 PROPERTIES COMPILE_FLAGS -ffixed-form)
34
ADD_TEST_FORTRAN(FixedOutputTestXdmfFortran -ffixed-form)
35 36 37 38 39 40 41 42 43 44

# Add any cxx cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
#       have multiple files (ie: CLEAN_TEST_CXX(testname outputfile1 ...))
#       Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_TEST_FORTRAN(OutputTestXdmfFortran)
CLEAN_TEST_FORTRAN(TestXdmfFortran
  my_output.h5
  my_output.xmf)
45 46 47 48 49 50
CLEAN_TEST_FORTRAN(NestedInfoFortran
  nested_output.xmf
  nested_output.h5)
CLEAN_TEST_FORTRAN(EditTestXdmfFortran
  edited_output.xmf
  edited_output.h5)
51
CLEAN_TEST_FORTRAN(FixedOutputTestXdmfFortran)