]> git.ipfire.org Git - thirdparty/curl.git/commit
build: sync tests unity builds between cmake and autotools
authorViktor Szakats <commit@vsz.me>
Sun, 15 Jun 2025 19:54:20 +0000 (21:54 +0200)
committerViktor Szakats <commit@vsz.me>
Sun, 15 Jun 2025 23:07:41 +0000 (01:07 +0200)
commitee066732963b7051a8d2fd56fa91a4ce0b444bd5
treeaae0bbadd7ed4c72656d2daac2b417b91dd8e993
parent3186a20483b4c829cb211d48393285ecc95c4273
build: sync tests unity builds between cmake and autotools

Instead of relying on CMake's built-in unity feature, use `mk-unity.pl`,
as already done with autotools. It simplified the build, shortens logs
and makes debugging easier because of the fewer build variations.
It also allows testing / fixing with cmake and those automatically apply
to autotools builds too. cmake builds can be much-much faster, esp.
when working the builds themselves.

It also enables "unity" in old cmake versions. Basically every test
target is a single generated .c source.

Also:
- drop a `lib` unity workaround for libtests with autotools after fixing
  the issue in libtests itself. It drops a few exceptions and makes
  libcurl build faster (in autotools unity).
- fix another `lib` autotools unity issue and drop the workaround for it
  from `mk-unity.pl`. `srcdir` was missing from the header path.
- simplify `mk-unity.pl` command-lines, drop exclusions.

Follow-up to 2c27a67daa1b76859c18d63e4e1f528db05b5e13 #17590

Closes #17628
docs/examples/CMakeLists.txt
lib/Makefile.am
scripts/mk-unity.pl
tests/libtest/CMakeLists.txt
tests/libtest/Makefile.am
tests/server/CMakeLists.txt
tests/server/Makefile.am
tests/tunit/CMakeLists.txt
tests/unit/CMakeLists.txt