From 0f8f82a3cf639233c69c893c102a82b6e11ae98e Mon Sep 17 00:00:00 2001 From: "zugz (tox)" Date: Sat, 8 Dec 2018 12:32:32 +0100 Subject: Add cmake option for building additional tests Closes #1262 --- CMakeLists.txt | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c82f8a69..ed4c2191 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -508,18 +508,21 @@ if(NOT WIN32 endif() endif() -add_executable(DHT_test ${CPUFEATURES} - testing/DHT_test.c) -target_link_modules(DHT_test toxcore misc_tools) - -add_executable(Messenger_test ${CPUFEATURES} - testing/Messenger_test.c) -target_link_modules(Messenger_test toxcore misc_tools) - -add_executable(random_testing ${CPUFEATURES} - testing/random_testing.cc) -target_link_modules(random_testing toxcore misc_tools) - -add_executable(save-generator - other/fun/save-generator.c) -target_link_modules(save-generator toxcore misc_tools) +option(BUILD_MISC_TESTS "Build additional tests" OFF) +if (BUILD_MISC_TESTS) + add_executable(DHT_test ${CPUFEATURES} + testing/DHT_test.c) + target_link_modules(DHT_test toxcore misc_tools) + + add_executable(Messenger_test ${CPUFEATURES} + testing/Messenger_test.c) + target_link_modules(Messenger_test toxcore misc_tools) + + add_executable(random_testing ${CPUFEATURES} + testing/random_testing.cc) + target_link_modules(random_testing toxcore misc_tools) + + add_executable(save-generator + other/fun/save-generator.c) + target_link_modules(save-generator toxcore misc_tools) +endif() -- cgit v1.2.3