mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:13:35 +03:00
cmake: make runtests targets build the curl tool
To allow running tests just by building the `test-full` (or similar) in a single step. Closes #17967
This commit is contained in:
parent
319d27e568
commit
3fd8846680
3 changed files with 10 additions and 3 deletions
|
|
@ -57,7 +57,10 @@ function(curl_add_runtests _targetname _test_flags)
|
|||
# This avoids: GNU Make doing a slow re-evaluation of all targets and
|
||||
# skipping them, MSBuild doing a re-evaluation, and actually rebuilding them.
|
||||
if(NOT _targetname STREQUAL "test-ci")
|
||||
set(_depends "testdeps")
|
||||
if(BUILD_CURL_EXE)
|
||||
list(APPEND _depends ${EXE_NAME})
|
||||
endif()
|
||||
list(APPEND _depends "testdeps")
|
||||
endif()
|
||||
# Use a special '$TFLAGS' placeholder as last argument which will be
|
||||
# replaced by the contents of the environment variable in runtests.pl.
|
||||
|
|
@ -78,7 +81,10 @@ endfunction()
|
|||
function(curl_add_pytests _targetname _test_flags)
|
||||
set(_depends "")
|
||||
if(NOT _targetname STREQUAL "pytest-ci")
|
||||
set(_depends "clients")
|
||||
if(BUILD_CURL_EXE)
|
||||
list(APPEND _depends ${EXE_NAME})
|
||||
endif()
|
||||
list(APPEND _depends "clients")
|
||||
endif()
|
||||
string(REPLACE " " ";" _test_flags_list "${_test_flags}")
|
||||
add_custom_target(${_targetname}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue