From c2ab2494ef375bfc5d621b39badabeb9a0c86f6a Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 10 May 2020 02:10:20 +0200 Subject: CMake: do not build test programs by default The default target should only build libcurl and curl. Add a dedicated 'testdeps' target which will be used later when running tests. Note that unittests are currently broken in CMake and already excluded. Closes #5368 --- tests/unit/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/unit') diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index a8c462b82..a18ea18e0 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -58,7 +58,8 @@ include_directories( foreach(_testfile ${UT_SRC}) get_filename_component(_testname ${_testfile} NAME_WE) - add_executable(${_testname} ${_testfile} ${UT_COMMON_FILES}) + add_executable(${_testname} EXCLUDE_FROM_ALL ${_testfile} ${UT_COMMON_FILES}) + #add_dependencies(testdeps ${_testname}) target_link_libraries(${_testname} libcurl ${CURL_LIBS}) set_target_properties(${_testname} PROPERTIES COMPILE_DEFINITIONS "UNITTESTS") -- cgit v1.2.3