From 535fba02cd27020f9c64dcbe4e97584a145816d4 Mon Sep 17 00:00:00 2001 From: Thijs Paelman Date: Tue, 4 Nov 2025 13:35:52 +0100 Subject: build: Include tests in 'all' target When BUILD_TESTING=ON, then the default 'all' target will now build also the tests. This behaviour could be controlled by an extra variable (see https://stackoverflow.com/a/42235335), but this increases complexity without many benefits. Signed-off-by: Thijs Paelman Signed-off-by: Sander Vrijders --- src/ipcpd/unicast/dir/tests/CMakeLists.txt | 2 +- src/ipcpd/unicast/pff/tests/CMakeLists.txt | 2 +- src/ipcpd/unicast/routing/tests/CMakeLists.txt | 2 +- src/irmd/reg/tests/CMakeLists.txt | 2 +- src/irmd/tests/CMakeLists.txt | 2 +- src/lib/tests/CMakeLists.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ipcpd/unicast/dir/tests/CMakeLists.txt b/src/ipcpd/unicast/dir/tests/CMakeLists.txt index f62ed993..897f1ec2 100644 --- a/src/ipcpd/unicast/dir/tests/CMakeLists.txt +++ b/src/ipcpd/unicast/dir/tests/CMakeLists.txt @@ -21,7 +21,7 @@ create_test_sourcelist(${PARENT_DIR}_tests test_suite.c ) protobuf_generate_c(DHT_PROTO_SRCS KAD_PROTO_HDRS ../dht.proto) -add_executable(${PARENT_DIR}_test EXCLUDE_FROM_ALL ${${PARENT_DIR}_tests} +add_executable(${PARENT_DIR}_test ${${PARENT_DIR}_tests} ${DHT_PROTO_SRCS}) target_link_libraries(${PARENT_DIR}_test ouroboros-common) diff --git a/src/ipcpd/unicast/pff/tests/CMakeLists.txt b/src/ipcpd/unicast/pff/tests/CMakeLists.txt index 65705714..99c32e7a 100644 --- a/src/ipcpd/unicast/pff/tests/CMakeLists.txt +++ b/src/ipcpd/unicast/pff/tests/CMakeLists.txt @@ -20,7 +20,7 @@ create_test_sourcelist(${PARENT_DIR}_tests test_suite.c pft_test.c ) -add_executable(${PARENT_DIR}_test EXCLUDE_FROM_ALL ${${PARENT_DIR}_tests}) +add_executable(${PARENT_DIR}_test ${${PARENT_DIR}_tests}) target_link_libraries(${PARENT_DIR}_test ouroboros-common) add_dependencies(check ${PARENT_DIR}_test) diff --git a/src/ipcpd/unicast/routing/tests/CMakeLists.txt b/src/ipcpd/unicast/routing/tests/CMakeLists.txt index 9d24bf03..b5011474 100644 --- a/src/ipcpd/unicast/routing/tests/CMakeLists.txt +++ b/src/ipcpd/unicast/routing/tests/CMakeLists.txt @@ -20,7 +20,7 @@ create_test_sourcelist(${PARENT_DIR}_tests test_suite.c graph_test.c ) -add_executable(${PARENT_DIR}_test EXCLUDE_FROM_ALL ${${PARENT_DIR}_tests}) +add_executable(${PARENT_DIR}_test ${${PARENT_DIR}_tests}) target_link_libraries(${PARENT_DIR}_test ouroboros-common) add_dependencies(check ${PARENT_DIR}_test) diff --git a/src/irmd/reg/tests/CMakeLists.txt b/src/irmd/reg/tests/CMakeLists.txt index 7bc98571..73df911b 100644 --- a/src/irmd/reg/tests/CMakeLists.txt +++ b/src/irmd/reg/tests/CMakeLists.txt @@ -11,7 +11,7 @@ create_test_sourcelist(${src_folder}_tests test_suite.c reg_test.c ) -add_executable(${src_folder}_test EXCLUDE_FROM_ALL ${${src_folder}_tests}) +add_executable(${src_folder}_test ${${src_folder}_tests}) target_link_libraries(${src_folder}_test ouroboros-common) if (CMAKE_BUILD_TYPE MATCHES "Debug*") diff --git a/src/irmd/tests/CMakeLists.txt b/src/irmd/tests/CMakeLists.txt index e860acce..4b62261c 100644 --- a/src/irmd/tests/CMakeLists.txt +++ b/src/irmd/tests/CMakeLists.txt @@ -7,7 +7,7 @@ create_test_sourcelist(${src_folder}_tests test_suite.c oap_test.c ) -add_executable(${src_folder}_test EXCLUDE_FROM_ALL ${${src_folder}_tests}) +add_executable(${src_folder}_test ${${src_folder}_tests}) target_link_libraries(${src_folder}_test ouroboros-common) add_dependencies(check ${src_folder}_test) diff --git a/src/lib/tests/CMakeLists.txt b/src/lib/tests/CMakeLists.txt index 2791dd0d..c795c1ac 100644 --- a/src/lib/tests/CMakeLists.txt +++ b/src/lib/tests/CMakeLists.txt @@ -17,7 +17,7 @@ create_test_sourcelist(${PARENT_DIR}_tests test_suite.c tpm_test.c ) -add_executable(${PARENT_DIR}_test EXCLUDE_FROM_ALL ${${PARENT_DIR}_tests}) +add_executable(${PARENT_DIR}_test ${${PARENT_DIR}_tests}) target_link_libraries(${PARENT_DIR}_test ouroboros-common) -- cgit v1.2.3