| --- a/CMakeLists.txt |
| +++ b/CMakeLists.txt |
| @@ -42,7 +42,7 @@ |
| # The link libraries should contain the code under test. The TEST_SUPPORT_LIBS are also linked |
| # automatically. |
| function (add_qtestlib_tests test_source_files) |
| - if (DEFINED TEST_SUPPORT_LIBS) |
| + if (DEFINED TEST_SUPPORT_LIBS AND WITH_TESTS) |
| foreach(test_file_src ${test_source_files}) |
| get_filename_component(test_file_path ${test_file_src} PATH) |
| get_filename_component(test_file_base ${test_file_src} NAME_WE) |
| @@ -54,7 +54,7 @@ |
| target_link_libraries( ${test_exe} ${TEST_SUPPORT_LIBS} ${ARGN} ) |
| add_test(${test_file_base} ${EXECUTABLE_OUTPUT_PATH}/${test_exe} ) |
| endforeach(test_file_src) |
| - endif (DEFINED TEST_SUPPORT_LIBS) |
| + endif (DEFINED TEST_SUPPORT_LIBS AND WITH_TESTS) |
| endfunction(add_qtestlib_tests) |
| |
| add_subdirectory (socketsentry-service) |