mirror of
https://github.com/curl/curl.git
synced 2026-08-26 19:13:33 +03:00
cmake: set CURL_DIRSUFFIX automatically in multi-config builds
To make it easier to run tests when using the Visual Studio generator, also perhaps Xcode. Also drop manual settings from CI. Closes #18241
This commit is contained in:
parent
c04292648f
commit
7fd7d561c4
3 changed files with 5 additions and 2 deletions
|
|
@ -61,6 +61,10 @@ function(curl_add_runtests _targetname _test_flags)
|
|||
endif()
|
||||
list(APPEND _depends "testdeps")
|
||||
endif()
|
||||
set(_setenv "")
|
||||
if(CMAKE_CONFIGURATION_TYPES)
|
||||
set(_setenv "${CMAKE_COMMAND}" -E env "CURL_DIRSUFFIX=$<CONFIG>")
|
||||
endif()
|
||||
# Use a special '$TFLAGS' placeholder as last argument which will be
|
||||
# replaced by the contents of the environment variable in runtests.pl.
|
||||
# This is a workaround for CMake's limitation where commands executed by
|
||||
|
|
@ -68,6 +72,7 @@ function(curl_add_runtests _targetname _test_flags)
|
|||
string(REPLACE " " ";" _test_flags_list "${_test_flags}")
|
||||
add_custom_target(${_targetname}
|
||||
COMMAND
|
||||
${_setenv}
|
||||
"${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runtests.pl"
|
||||
${_test_flags_list}
|
||||
"\$TFLAGS"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue