aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-02-08 22:22:30 +0100
committerJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-02-08 22:22:30 +0100
commita8e112a6707877ce24f9560104d157409942b957 (patch)
treedd5427303bc7668bcb06e56da9d8ef60c0cb2404
parentf672202ff2ec279e5c3260e8810a4ccc213a5876 (diff)
downloadegawk-a8e112a6707877ce24f9560104d157409942b957.tar.gz
egawk-a8e112a6707877ce24f9560104d157409942b957.tar.bz2
egawk-a8e112a6707877ce24f9560104d157409942b957.zip
New target 'check' is a very crude first step toward testing that will soon disappear.
-rw-r--r--CMakeLists.txt3
-rw-r--r--test/CMakeLists.txt8
2 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a67ed2a1..07c6d342 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -270,8 +270,7 @@ set (GAWK_SOURCES ${GAWK_SOURCES}
add_executable (gawk ${GAWK_SOURCES})
target_link_libraries (gawk m ${EXTRA_LIBS})
-if(${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
-else()
+if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
add_subdirectory(test)
add_subdirectory(doc)
endif()
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 2ed72205..d54aad1f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -24,3 +24,11 @@
## 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
+)
+