mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:33:37 +03:00
src: omit hugehelp and ca-embed from libcurltool
CMake builds using the Xcode generator broke with an error saying it
doesn't support multiple targets depending on the same custom commands.
These custom commands are generating `tool_hugehelp.c` and
`tool_c_embed.c` for the curl tool and libcurltool.
`unit1394` and `unit1604` tests use libcurltool to test tool-specific
functions. They don't need hugehelp and ca-embed. It's thus safe to
disable and exclude them when compiling the sources for libcurltool.
Use the `UNITTESTS` macro to detect a libcurltool build within C.
After this patch these sources are solely used for building the curl
tool. Making the build compatible with the CMake Xcode generator.
Apply the change to autotools too to keep build systems synchronized.
Follow-up to 12a6de2f66 #16043
Closes #16068
This commit is contained in:
parent
8dfd271c35
commit
96843f4ef7
5 changed files with 37 additions and 22 deletions
|
|
@ -94,7 +94,9 @@
|
|||
#include "tool_xattr.h"
|
||||
#include "tool_vms.h"
|
||||
#include "tool_help.h"
|
||||
#ifndef UNITTESTS
|
||||
#include "tool_hugehelp.h"
|
||||
#endif
|
||||
#include "tool_progress.h"
|
||||
#include "tool_ipfs.h"
|
||||
#include "dynbuf.h"
|
||||
|
|
@ -105,6 +107,10 @@ CURL_EXTERN CURLcode curl_easy_perform_ev(CURL *easy);
|
|||
|
||||
#include "memdebug.h" /* keep this as LAST include */
|
||||
|
||||
#ifdef UNITTESTS
|
||||
#undef CURL_CA_EMBED
|
||||
#endif
|
||||
|
||||
#ifdef CURL_CA_EMBED
|
||||
#ifndef CURL_DECLARED_CURL_CA_EMBED
|
||||
#define CURL_DECLARED_CURL_CA_EMBED
|
||||
|
|
@ -3184,8 +3190,11 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
|
|||
if(res == PARAM_HELP_REQUESTED)
|
||||
tool_help(global->help_category);
|
||||
/* Check if we were asked for the manual */
|
||||
else if(res == PARAM_MANUAL_REQUESTED)
|
||||
else if(res == PARAM_MANUAL_REQUESTED) {
|
||||
#ifndef UNITTESTS
|
||||
hugehelp();
|
||||
#endif
|
||||
}
|
||||
/* Check if we were asked for the version information */
|
||||
else if(res == PARAM_VERSION_INFO_REQUESTED)
|
||||
tool_version_info();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue