[libsigcplusplus] CMake: tests: explicitly list the tests.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] CMake: tests: explicitly list the tests.
- Date: Fri, 18 Mar 2016 07:37:13 +0000 (UTC)
commit f5670e1ec9b8e14068df9726d9f77f992a7d2fe1
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Mar 18 08:36:42 2016 +0100
CMake: tests: explicitly list the tests.
I don't like just looking for *.cc files in the directory. That
seems fragile.
tests/CMakeLists.txt | 42 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 2 deletions(-)
---
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index e91ffaf..69387b0 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -16,6 +16,45 @@
enable_testing ()
+set (TEST_SOURCE_FILES
+ test_accum_iter.cc
+ test_accumulated.cc
+ test_bind_as_slot.cc
+ test_bind.cc
+ test_bind_ref.cc
+ test_bind_refptr.cc
+ test_bind_return.cc
+ test_compose.cc
+ test_copy_invalid_slot.cc
+ test_cpp11_lambda.cc
+ test_custom.cc
+ test_disconnect.cc
+ test_disconnect_during_emit.cc
+ test_exception_catch.cc
+ test_functor_trait.cc
+ test_hide.cc
+ test_limit_reference.cc
+ test_member_method_trait.cc
+ test_mem_fun.cc
+ test_ptr_fun.cc
+ test_retype.cc
+ test_retype_return.cc
+ test_signal.cc
+ test_signal_move.cc
+ test_size.cc
+ test_slot.cc
+ test_slot_disconnect.cc
+ test_slot_move.cc
+ test_trackable.cc
+ test_trackable_move.cc
+ test_track_obj.cc
+ test_tuple_cdr.cc
+ test_tuple_end.cc
+ test_tuple_for_each.cc
+ test_tuple_start.cc
+ test_tuple_transform_each.cc
+ test_visit_each.cc)
+
function (add_sigcpp_test TEST_SOURCE_FILE)
get_filename_component (test_name ${TEST_SOURCE_FILE} NAME_WE)
add_executable (${test_name} ${TEST_SOURCE_FILE} testutilities.cc)
@@ -23,7 +62,6 @@ function (add_sigcpp_test TEST_SOURCE_FILE)
add_test (${test_name} ${CMAKE_CURRENT_BINARY_DIR}/${test_name})
endfunction (add_sigcpp_test)
-file(GLOB test_files "test_*.cc")
-foreach (test_file ${test_files})
+foreach (test_file ${TEST_SOURCE_FILES})
add_sigcpp_test (${test_file})
endforeach()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]