aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-05-27 21:30:13 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-05-27 21:30:13 +0200
commit1023dd445a0181fb35f6dfc98faf8ff030605cc8 (patch)
tree6212de6d43c0979f08d0c87a60773056b53d4ce3
parent11b4d7cb4fc6edee866d9915b791bc8ab9424d1a (diff)
downloadtermo-1023dd445a0181fb35f6dfc98faf8ff030605cc8.tar.gz
termo-1023dd445a0181fb35f6dfc98faf8ff030605cc8.tar.xz
termo-1023dd445a0181fb35f6dfc98faf8ff030605cc8.zip
CMakeLists.txt: build tests
-rw-r--r--CMakeLists.txt25
1 files changed, 20 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f89bab6..7b28b70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -122,16 +122,31 @@ install (FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
# Do some unit tests
option (BUILD_TESTING "Build tests" OFF)
-# TODO: glob, port the tests to CTest
-set (project_tests)
+# TODO: port the tests to CTest (?)
+set (project_tests
+ 01base
+ 02getkey
+ 03utf8
+ 04flags
+ 05read
+ 06buffer
+ 10keyname
+ 11strfkey
+ 12strpkey
+ 13cmpkey
+ 20canon
+ 30mouse
+ 31position
+ 32modereport
+ 39csi)
if (BUILD_TESTING)
enable_testing ()
- set (test_common_sources t/taplib.c t/taplib.h)
+ set (test_common_sources tests/taplib.c tests/taplib.h)
foreach (name ${project_tests})
- add_executable (test-${name} t/${name}.c ${test_common_sources})
- target_link_libraries (test-${name} ${lib_libraries})
+ add_executable (test-${name} tests/${name}.c ${test_common_sources})
+ target_link_libraries (test-${name} termo-static ${lib_libraries})
add_test (test-${name} test-${name})
endforeach (name)
endif (BUILD_TESTING)