mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:33:38 +03:00
cmake: replace cmakelint with cmake-lint from cmakelang, fix issues
This linter detects formatting and naming issues with minimal amount of noise. It seems to be an improvement over the existing linter which was only detecting line width overruns. Also: fix to exclude `CurlTests.c` from linter. Ref: https://cmake-format.readthedocs.io/en/latest/cmake-lint.html Ref: https://github.com/cheshirekow/cmake_format Closes #17576
This commit is contained in:
parent
56d5982312
commit
b761eb5add
12 changed files with 72 additions and 39 deletions
|
|
@ -42,6 +42,7 @@ add_subdirectory(tunit)
|
|||
add_subdirectory(unit)
|
||||
add_subdirectory(certs)
|
||||
|
||||
# Add a runtests target with customized flags
|
||||
function(curl_add_runtests _targetname _test_flags)
|
||||
if(NOT BUILD_LIBCURL_DOCS)
|
||||
string(APPEND _test_flags " !documentation")
|
||||
|
|
@ -68,6 +69,7 @@ function(curl_add_runtests _targetname _test_flags)
|
|||
)
|
||||
endfunction()
|
||||
|
||||
# Add a pytests target with customized flags
|
||||
function(curl_add_pytests _targetname _test_flags)
|
||||
set(_depends "")
|
||||
if(NOT _targetname STREQUAL "pytest-ci")
|
||||
|
|
|
|||
|
|
@ -47,15 +47,15 @@ if(TEST_INTEGRATION_MODE STREQUAL "find_package" OR
|
|||
TEST_INTEGRATION_MODE STREQUAL "ExternalProject")
|
||||
find_package(CURL REQUIRED CONFIG)
|
||||
find_package(CURL REQUIRED CONFIG) # Double-inclusion test
|
||||
foreach(result_var IN ITEMS
|
||||
foreach(_result_var IN ITEMS
|
||||
CURL_FOUND
|
||||
CURL_SUPPORTS_HTTPS
|
||||
CURL_SUPPORTS_Largefile
|
||||
CURL_VERSION
|
||||
CURL_VERSION_STRING
|
||||
)
|
||||
if(NOT ${result_var})
|
||||
message(FATAL_ERROR "'${result_var}' variable expected, but not set by the CURL package.")
|
||||
)
|
||||
if(NOT ${_result_var})
|
||||
message(FATAL_ERROR "'${_result_var}' variable expected, but not set by the CURL package.")
|
||||
endif()
|
||||
endforeach()
|
||||
# Show variables set by find_package()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue