mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-27 08:49:16 +08:00
Updated to include new test
This commit is contained in:
parent
d70e9254a4
commit
8684170c17
@ -17,6 +17,16 @@ IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Get system configuration
|
||||
find_program(UNAME NAMES uname)
|
||||
macro(getuname name flag)
|
||||
exec_program("${UNAME}" ARGS "${flag}" OUTPUT_VARIABLE "${name}")
|
||||
endmacro(getuname)
|
||||
getuname(osname -s)
|
||||
getuname(osrel -r)
|
||||
getuname(cpu -m)
|
||||
set(BUILDNAME "${osname}-${osrel}-${cpu}" CACHE STRING "Build name variable for CDash")
|
||||
|
||||
ENABLE_TESTING()
|
||||
INCLUDE(CTest)
|
||||
|
||||
@ -142,6 +152,16 @@ MACRO(add_bin_test_no_prefix F)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
# Binary tests which are used by a script looking for a specific name.
|
||||
MACRO(build_bin_test_no_prefix F)
|
||||
build_bin_test(${F})
|
||||
ADD_TEST(${F} ${EXECUTABLE_OUTPUT_PATH}/${F})
|
||||
IF(MSVC)
|
||||
SET_PROPERTY(TEST ${F} PROPERTY FOLDER "tests/")
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
MACRO(add_bin_test prefix F)
|
||||
ADD_EXECUTABLE(${prefix}_${F} ${F}.c)
|
||||
TARGET_LINK_LIBRARIES(${prefix}_${F} netcdf)
|
||||
|
@ -64,6 +64,8 @@ IF(TEST_PARALLEL)
|
||||
ENDIF()
|
||||
|
||||
IF(USE_PNETCDF)
|
||||
add_bin_test_no_prefix(tst_parallel2)
|
||||
build_bin_test_no_prefix(tst_pnetcdf)
|
||||
build_bin_test_no_prefix(tst_parallel2)
|
||||
add_sh_test(nc_test4 run_pnetcdf_test)
|
||||
#add_sh_test(nc_test4 run_pnetcdf_test)
|
||||
ENDIF()
|
||||
|
Loading…
Reference in New Issue
Block a user