SET(CMAKE_VERBOSE_MAKEFILE OFF)
SET(CMAKE_BUILD_TYPE "RelWithDebInfo")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)

SET(TESTS)

# Need some stuff from ../nf_test
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/nf_test)

SET(check_PROGRAMS ${check_PROGRAMS} tst_f90 tst_fill_int64)
SET(TESTS ${TESTS} tst_f90 tst_fill_int64)
SET(tst_f90_SOURCES tst_f90.F90)
SET(tst_fill_int64_SOURCES tst_fill_int64.F90)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/fortran ${CMAKE_SOURCE_DIR}/libsrc ${CMAKE_SOURCE_DIR}
  ${CMAKE_CPP_FLAGS} ${NETCDF_C_INCLUDE_DIR})
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/fortran ${CMAKE_SOURCE_DIR}/libsrc)
FOREACH(t ${TESTS})
  ADD_EXECUTABLE(${t} ${${t}_SOURCES})
  TARGET_LINK_LIBRARIES(${t} netcdff)
  ADD_TEST(${t} ${t})
ENDFOREACH()
