summaryrefslogtreecommitdiff
blob: 050e7b2efd2542f4ab954ca47b982ee4ef2a2377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- 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)