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
This commit is contained in:
Peter Wu 2020-05-10 02:10:20 +02:00 committed by Daniel Stenberg
parent 90bbfb5136
commit c2ab2494ef
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 9 additions and 4 deletions

View file

@ -26,7 +26,8 @@ if(MSVC)
endif()
function(SETUP_EXECUTABLE TEST_NAME) # ARGN are the files in the test
add_executable(${TEST_NAME} ${ARGN})
add_executable(${TEST_NAME} EXCLUDE_FROM_ALL ${ARGN})
add_dependencies(testdeps ${TEST_NAME})
string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
include_directories(