netcdf-c/examples/CDL/CMakeLists.txt
Thomas Braun 3af477a926 netcdf-c: Make cmake pass a windows cmd prompt
add_sh_test only creates the test if HAVE_BASH is TRUE.
Therefore we can only call SET_TESTS_PROPERTIES on the created test if
HAVE_BASH is equally true.
2018-04-26 14:43:27 +02:00

18 lines
724 B
CMake

SET(CDL_EXAMPLE_TESTS do_comps)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh ${CMAKE_CURRENT_SOURCE_DIR}/*.cdl)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
FOREACH(F ${CDL_EXAMPLE_TESTS})
add_sh_test(cdl ${F})
ENDFOREACH()
IF(HAVE_BASH)
SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_tests_simple_xy_wr)
SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_tests_sfc_pres_temp_wr)
SET_TESTS_PROPERTIES(cdl_do_comps PROPERTIES DEPENDS C_test_pres_temp_4D_wr)
ENDIF(HAVE_BASH)
SET(CLEANFILES simple_xy.nc sfc_pres_temp.nc pres_temp_4D.nc)
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CLEANFILES}")