From: Viktor Szakats Date: Fri, 26 Jun 2026 18:45:07 +0000 (+0200) Subject: cmake: fix not to build `tunits` when `BUILD_CURL_EXE=OFF` X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da2f05e6f6cee66ea46b8b1ca3943e5a6dde0b91;p=thirdparty%2Fcurl.git cmake: fix not to build `tunits` when `BUILD_CURL_EXE=OFF` It fails as expected, with a list of errors: ``` In file included from _x64-win-ucrt-for-trurl-bld/tests/tunit/tunits.c:5: tests/tunit/tool1394.c:76:11: error: call to undeclared function 'parse_cert_parameter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 76 | err = parse_cert_parameter(p->param, &certname, &passphrase); | ^ [...] tests/tunit/tool1622.c:68:5: error: call to undeclared function 'timebuf'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 68 | timebuf(buffer, sizeof(buffer), secs); | ^ [...] tests/tunit/tool1623.c:104:26: error: call to undeclared function 'GetSizeParameter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 104 | ParameterError err = GetSizeParameter(check[i].input, &output); | ^ [...] ``` Ref: https://github.com/curl/curl/actions/runs/28256499057/job/83720797064?pr=22195 Ref: #22195 Ref: https://github.com/curl/curl-for-win/commit/640fed88b65052e944edb466387bd8a062bd9b37 Closes #22198 --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6de7f96d0a..55928fac51 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -51,7 +51,9 @@ add_dependencies(testdeps "tt") add_subdirectory(http) add_subdirectory(server) add_subdirectory(libtest) -add_subdirectory(tunit) +if(BUILD_CURL_EXE) + add_subdirectory(tunit) +endif() add_subdirectory(unit) add_subdirectory(certs)