Updated to include new test

This commit is contained in:
Ward Fisher 2013-03-11 21:00:15 +00:00
parent d70e9254a4
commit 8684170c17
2 changed files with 23 additions and 1 deletions

View File

@ -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)

View File

@ -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()