aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-02-03 00:03:08 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-02-03 08:13:56 +0100
commite651ac258ae65a03731000ddb1582804570ea3dc (patch)
tree5e30d78da0e4660adb4a6915c91c565b663fa60e /CMakeLists.txt
parent75c2358b6967c0148087638364b64da66667f8a2 (diff)
downloadlogdiag-e651ac258ae65a03731000ddb1582804570ea3dc.tar.gz
logdiag-e651ac258ae65a03731000ddb1582804570ea3dc.tar.xz
logdiag-e651ac258ae65a03731000ddb1582804570ea3dc.zip
Add a unit test for LdPointArray.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a7e62ec..00c6b71 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -142,6 +142,9 @@ set (liblogdiag_HEADERS
liblogdiag/ld-lua-symbol.h
liblogdiag/ld-lua-symbol-private.h)
+set (logdiag_TESTS
+ point-array)
+
set (logdiag_SOURCES
src/ld-window-main.c
src/logdiag.c)
@@ -220,6 +223,20 @@ set_target_properties (liblogdiag PROPERTIES OUTPUT_NAME logdiag)
add_executable (logdiag WIN32 ${logdiag_SOURCES} ${logdiag_HEADERS})
target_link_libraries (logdiag liblogdiag ${logdiag_LIBS})
+# Testing
+option (BUILD_TESTING "Build tests" OFF)
+
+if (BUILD_TESTING)
+ enable_testing ()
+
+ foreach (name ${logdiag_TESTS})
+ add_executable (test-${name} tests/${name}.c)
+ target_link_libraries (test-${name} liblogdiag ${logdiag_LIBS})
+
+ add_test (test-${name} test-${name})
+ endforeach (name)
+endif (BUILD_TESTING)
+
# Generate documentation
if (GTK_DOC_FOUND)
GTK_DOC_RUN (WORKING_DIR ${project_DOC_DIR}