diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/CMakeLists.txt | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 07c6d342..07edfca3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -271,6 +271,7 @@ add_executable (gawk ${GAWK_SOURCES}) target_link_libraries (gawk m ${EXTRA_LIBS}) if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE") + enable_testing() add_subdirectory(test) add_subdirectory(doc) endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d54aad1f..1b7c4173 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,11 +24,9 @@ ## process this file with CMake to produce Makefile -add_custom_target(check) -add_custom_command( - TARGET check - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND ${CMAKE_BINARY_DIR}/gawk -f addcomma.awk < addcomma.in > _addcomma 2>&1 || echo EXIT CODE: $$? >>_$@ - COMMAND cmp addcomma.ok _addcomma && rm -f _addcomma -) +set(BASIC_TESTS addcomma anchgsub arrayparm arrayprm2 arrayprm3 arrayref arrymem1 arryref2 arryref3 arryref4 arryref5) + +foreach(testcase ${BASIC_TESTS}) + add_test(${testcase} ${CMAKE_SOURCE_DIR}/cmake/basictest ${CMAKE_BINARY_DIR}/gawk ${testcase} ) +endforeach(testcase) |