Since
a16485a42ea5dabe6c, the test servers build with a different set of
options than the tool/lib - for example a different CURLDEBUG. To make
buildinfo better reflect the curl build, move it to src/ and build it
here using the local CURLDEBUG. Renamed to curlinfo to not get confused
with buildinfo.txt
I chose src/ and not lib/ because the file also uses tool-specific headers.
Assisted-by: Viktor Szakats
Closes #17187
add_executable(${PROJECT_NAME}::${EXE_NAME} ALIAS ${EXE_NAME})
+add_executable(
+ curlinfo
+ EXCLUDE_FROM_ALL
+ curlinfo.c
+)
+
add_library(
curltool # special libcurltool library just for unittests
STATIC
bin_PROGRAMS = curl
+curlinfo_SOURCES = curlinfo.c
+noinst_PROGRAMS = curlinfo
+
if USE_CPPFLAG_CURL_STATICLIB
AM_CPPFLAGS += -DCURL_STATICLIB
endif
AM_LDFLAGS =
if USE_UNICODE
-AM_LDFLAGS += -municode
+UNICODEFLAG = -municode
endif
include Makefile.inc
$(CURL_RCFILES): tool_version.h
endif
-curl_LDFLAGS = $(AM_LDFLAGS) $(CURL_LDFLAGS_BIN)
+curl_LDFLAGS = $(AM_LDFLAGS) $(CURL_LDFLAGS_BIN) $(UNICODEFLAG)
# This might hold -Werror
CFLAGS += @CURL_CFLAG_EXTRAS@
/*
* The purpose of this tool is to figure out which, if any, features that are
- * disabled which should otherwise exist and work. These aren't visible in
+ * disabled which should otherwise exist and work. These are not visible in
* regular curl -V output.
*
* Disabled protocols are visible in curl_version_info() and are not included
configure_file("config.in" "${CMAKE_CURRENT_BINARY_DIR}/config" @ONLY)
add_custom_target(testdeps)
+if(BUILD_CURL_EXE)
+ add_dependencies(testdeps curlinfo)
+endif()
+
add_subdirectory(http)
add_subdirectory(http/clients)
add_subdirectory(server)
$anyway
$automakestyle
$CURL
+ $CURLINFO
$CURLVERSION
$CURLVERNUM
$DATE
our $TUNITDIR=dirsepadd("./tunit/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
our $SRVDIR=dirsepadd("./server/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
our $TESTDIR="$srcdir/data";
-our $CURL=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) . "curl".exe_ext('TOOL'); # what curl binary to run on the tests
+our $CURL=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) .
+ "curl".exe_ext('TOOL'); # what curl binary to run on the tests
+our $CURLINFO=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) .
+ "curlinfo".exe_ext('TOOL'); # what curlinfo binary to run on the tests
+
our $VCURL=$CURL; # what curl binary to use to verify the servers with
# VCURL is handy to set to the system one when the one you
# just built hangs or crashes and thus prevent verification
@version = <$versout>;
close($versout);
- open(my $disabledh, "-|", server_exe('buildinfo', 'TOOL'));
+ open(my $disabledh, "-|", exerunner() . shell_quote($CURLINFO));
while(<$disabledh>) {
if($_ =~ /([^:]*): ([ONF]*)/) {
my ($val, $toggle) = ($1, $2);
#
###########################################################################
-SERVERPROGS = resolve rtspd sockfilt sws tftpd socksd buildinfo mqttd dnsd
+SERVERPROGS = resolve rtspd sockfilt sws tftpd socksd mqttd dnsd
MEMDEBUG = \
../../lib/memdebug.c \
dnsd.c
dnsd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
dnsd_CFLAGS = $(AM_CFLAGS)
-
-buildinfo_SOURCES = buildinfo.c
scanconf_cmake(\%disable_cmake_config_h, "$root/lib/curl_config.h.cmake");
}
+my %whitelisted = ("CURL_DISABLE_TYPECHECK" => 1);
+
sub scan_file {
my ($source)=@_;
open F, "<$source";
while(<F>) {
while(s/(CURL_DISABLE_[A-Z0-9_]+)//) {
my ($sym)=($1);
- $file{$sym} = $source;
+
+ if(!$whitelisted{$sym}) {
+ $file{$sym} = $source;
+ }
}
}
close F;