mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
Added fenceposts around bash scripts, excluding the bash.exe included with Windows 10 (for now) when searching to see if bash is available.
This commit is contained in:
parent
9bb42b43d3
commit
28ce3e4a8c
@ -1557,9 +1557,15 @@ ENDMACRO()
|
||||
# Determine if 'bash' is on the system.
|
||||
##
|
||||
|
||||
FIND_PROGRAM(HAVE_BASH NAMES bash)
|
||||
FIND_PROGRAM(HAVE_BASH bash)
|
||||
IF(HAVE_BASH)
|
||||
MESSAGE(STATUS "Found bash: ${HAVE_BASH}")
|
||||
STRING(COMPARE EQUAL "${HAVE_BASH}" "C:/Windows/System32/bash.exe" IS_BASH_EXE)
|
||||
IF(NOT IS_BASH_EXE)
|
||||
MESSAGE(STATUS "Found bash: ${HAVE_BASH}")
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Ignoring ${HAVE_BASH}")
|
||||
SET(HAVE_BASH "")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Bash shell not found; disabling shell script tests.")
|
||||
ENDIF()
|
||||
|
@ -7,9 +7,11 @@ FOREACH(F ${CDL_EXAMPLE_TESTS})
|
||||
add_sh_test(cdl ${F})
|
||||
ENDFOREACH()
|
||||
|
||||
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)
|
||||
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}")
|
||||
|
@ -56,6 +56,7 @@ IF(HAVE_M4)
|
||||
FILE(GLOB libsrc_MANPAGE ${CMAKE_SOURCE_DIR}/docs/netcdf.m4)
|
||||
FILE(COPY ${libsrc_MANPAGE} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
IF(NOT MSVC)
|
||||
ADD_CUSTOM_TARGET(manpage ALL
|
||||
|
||||
COMMAND ${NC_M4} ${ARGS_MANPAGE} '${CMAKE_CURRENT_BINARY_DIR}/netcdf.m4' > '${CMAKE_CURRENT_BINARY_DIR}/netcdf.3'
|
||||
@ -63,4 +64,6 @@ IF(HAVE_M4)
|
||||
)
|
||||
|
||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/netcdf.3 DESTINATION "share/man/man3" COMPONENT documentation)
|
||||
ENDIF(NOT MSVC)
|
||||
|
||||
ENDIF()
|
||||
|
@ -121,7 +121,9 @@ ENDIF(MSVC)
|
||||
ENDIF(USE_STRICT_NULL_BYTE_HEADER_PADDING)
|
||||
|
||||
add_sh_test(ncdump tst_nccopy3)
|
||||
SET_TESTS_PROPERTIES(ncdump_tst_nccopy3 PROPERTIES RUN_SERIAL TRUE)
|
||||
IF(HAVE_BASH)
|
||||
SET_TESTS_PROPERTIES(ncdump_tst_nccopy3 PROPERTIES RUN_SERIAL TRUE)
|
||||
ENDIF(HAVE_BASH)
|
||||
|
||||
add_sh_test(ncdump tst_nccopy3_subset)
|
||||
add_sh_test(ncdump tst_charfill)
|
||||
@ -189,9 +191,9 @@ ENDIF(MSVC)
|
||||
add_sh_test(ncdump_sh tst_fillbug)
|
||||
|
||||
add_sh_test(ncdump tst_netcdf4_4)
|
||||
IF(MSVC)
|
||||
IF(MSVC AND HAVE_BASH)
|
||||
SET_TESTS_PROPERTIES(ncdump_tst_netcdf4_4 PROPERTIES WILL_FAIL TRUE)
|
||||
ENDIF(MSVC)
|
||||
ENDIF(MSVC AND HAVE_BASH)
|
||||
|
||||
###
|
||||
# Some test reordering was required to ensure these tests
|
||||
@ -207,7 +209,9 @@ ENDIF(MSVC)
|
||||
add_sh_test(ncdump_shell tst_h_scalar)
|
||||
|
||||
add_sh_test(ncdump tst_nccopy4)
|
||||
SET_TESTS_PROPERTIES(ncdump_tst_nccopy4 PROPERTIES RUN_SERIAL TRUE)
|
||||
IF(HAVE_BASH)
|
||||
SET_TESTS_PROPERTIES(ncdump_tst_nccopy4 PROPERTIES RUN_SERIAL TRUE)
|
||||
ENDIF(HAVE_BASH)
|
||||
|
||||
IF(USE_NETCDF4)
|
||||
add_sh_test(ncdump tst_ncgen4)
|
||||
|
@ -13,5 +13,6 @@ ADD_TEST(nctest ${EXECUTABLE_OUTPUT_PATH}/nctest)
|
||||
|
||||
add_bin_test_no_prefix(tst_rename)
|
||||
add_sh_test(nctest compare_test_files)
|
||||
|
||||
SET_TESTS_PROPERTIES(nctest_compare_test_files PROPERTIES DEPENDS nctest)
|
||||
IF(HAVE_BASH)
|
||||
SET_TESTS_PROPERTIES(nctest_compare_test_files PROPERTIES DEPENDS nctest)
|
||||
ENDIF(HAVE_BASH)
|
||||
|
Loading…
Reference in New Issue
Block a user