mirror of
https://github.com/curl/curl.git
synced 2026-05-30 06:17:28 +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
|
|
@ -175,6 +175,7 @@ else()
|
|||
endif()
|
||||
|
||||
set(LIB_NAME "libcurl")
|
||||
set(EXE_NAME "curl")
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES "${PROJECT_SOURCE_DIR}/include")
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
# SPDX-License-Identifier: curl
|
||||
#
|
||||
###########################################################################
|
||||
set(EXE_NAME curl)
|
||||
|
||||
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS "${CURL_DEBUG_MACROS}")
|
||||
|
||||
set(_curl_cfiles_gen "")
|
||||
|
|
|
|||
|
|
@ -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