mirror of
https://github.com/curl/curl.git
synced 2026-07-28 07:43:08 +03:00
tests/server: define CURL_STATICLIB in first.h instead of cm/am
This commit is contained in:
parent
3b8364e007
commit
f5906fa3f7
3 changed files with 14 additions and 8 deletions
|
|
@ -42,13 +42,7 @@ target_include_directories(${BUNDLE} PRIVATE
|
|||
"${PROJECT_SOURCE_DIR}/lib" # for "curl_setup.h", curlx
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}" # for the generated bundle source to find included test sources
|
||||
)
|
||||
# Test servers simply are standalone programs that do not use libcurl
|
||||
# library. For convenience and to ease portability of these servers,
|
||||
# some source code files from the libcurl subdirectory are also used
|
||||
# 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" "CURL_STATICLIB")
|
||||
target_compile_definitions(${BUNDLE} PRIVATE "WITHOUT_LIBCURL" "CURL_NO_OLDIES")
|
||||
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,7 +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 -DCURL_STATICLIB
|
||||
AM_CPPFLAGS += -DWITHOUT_LIBCURL -DCURL_NO_OLDIES
|
||||
|
||||
$(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
|
||||
|
|
|
|||
|
|
@ -23,6 +23,18 @@
|
|||
* SPDX-License-Identifier: curl
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* Test servers simply are standalone programs that do not use libcurl
|
||||
* library. For convenience and to ease portability of these servers,
|
||||
* some source code files from the libcurl subdirectory are also used
|
||||
* 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.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define CURL_STATICLIB
|
||||
#endif
|
||||
|
||||
#include "curl_setup.h"
|
||||
|
||||
typedef int (*entry_func_t)(int, char **);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue