mirror of
https://github.com/curl/curl.git
synced 2026-06-07 19:54:17 +03:00
tests/server: always pass CURL_STATICLIB (also on non-Windows)
To avoid generator expressions. Generator expresson do not work with curl_clang_tidy_tests() macro, resulting in an empty `-D` option and breaking clang-tidy: ``` error: macro name must be an identifier [clang-diagnostic-error] ``` https://github.com/curl/curl/actions/runs/15938223758/job/44962176793?pr=17768#step:14:337 But, curl/curl.h behaves the same on non-Windows with tests/server with and without CURL_STATICLIB, making it safe to pass for all platforms.
This commit is contained in:
parent
2f8eacbb26
commit
3b8364e007
2 changed files with 2 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
# to build the servers. In order to achieve proper linkage of these
|
||||
# files on Windows targets it is necessary to build the test servers
|
||||
# with CURL_STATICLIB defined, independently of how libcurl is built.
|
||||
target_compile_definitions(${BUNDLE} PRIVATE "WITHOUT_LIBCURL" "CURL_NO_OLDIES" "$<$<BOOL:${WIN32}>:CURL_STATICLIB>")
|
||||
target_compile_definitions(${BUNDLE} PRIVATE "WITHOUT_LIBCURL" "CURL_NO_OLDIES" "CURL_STATICLIB")
|
||||
set_target_properties(${BUNDLE} PROPERTIES OUTPUT_NAME "${BUNDLE}" PROJECT_LABEL "Test ${BUNDLE}" UNITY_BUILD OFF C_CLANG_TIDY "")
|
||||
|
||||
curl_add_clang_tidy_test_target("${BUNDLE}-clang-tidy" ${BUNDLE} ${FIRST_C} ${UTILS_C} ${TESTS_C})
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ CFLAGS += @CURL_CFLAG_EXTRAS@
|
|||
# Prevent LIBS from being used for all link targets
|
||||
LIBS = $(BLANK_AT_MAKETIME)
|
||||
|
||||
AM_CPPFLAGS += -DWITHOUT_LIBCURL -DCURL_NO_OLDIES
|
||||
if DOING_NATIVE_WINDOWS
|
||||
AM_CPPFLAGS += -DCURL_STATICLIB
|
||||
endif
|
||||
AM_CPPFLAGS += -DWITHOUT_LIBCURL -DCURL_NO_OLDIES -DCURL_STATICLIB
|
||||
|
||||
$(BUNDLE).c: $(top_srcdir)/scripts/mk-unity.pl Makefile.inc $(FIRST_C) $(UTILS_C) $(CURLX_C) $(TESTS_C)
|
||||
@PERL@ $(top_srcdir)/scripts/mk-unity.pl --include $(UTILS_C) $(CURLX_C) --test $(TESTS_C) > $(BUNDLE).c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue