Repository navigation
Conversation
|
Hm. I think I see the problem you're describing, but I think the proposed solution seems a bit convoluted. I don't like sniffing things at build time like that if it can be avoided, it's maybe better to just give cmake the right flags. But what I'd be for is maybe adding a build environment to the github action that explicitly tests both build systems in an environment with no C++ compiler. Then go from there with figuring out the minimal changes needed to ensure it works without a C++ compiler. |
|
Added a Debian C-only CI job for both CMake and Autotools in 3cee5b4, and removed the invalid-CXX-path probe. In a bookworm chroot with GCC 12 and no C++ compiler, the exact base fails CMake configuration at project(), while the patched source builds with WITH_TESTS=OFF and WITH_CPP_TESTS=OFF; Autotools with --disable-tests --disable-doc builds and installs too. The production change remains the single condition. The new hosted CI is still pending. |
With
WITH_TESTS=OFF, the default C library still enabled CXX atproject()becauseWITH_CPP_TESTSwas checked before the later tests-off handling.Enable CXX only when both test options are enabled, or when
BUILD_LANGUAGE=CXXis explicitly requested. The production fix remains this one condition change.Add a Debian C-only CI job that installs the C build dependencies, verifies that g++, c++ and clang++ are absent, and builds with both CMake and Autotools. Removed the invalid-CXX-path configuration probe and its source-distribution entry.
Validation in a Debian bookworm chroot with GCC 12 and no C++ compiler:
Earlier local tests and consumer checks used a different toolchain with C++ installed. They are historical evidence. Windows and macOS were not rerun locally; BUILD_LANGUAGE=CXX and network-enabled tests retain the previously reported baseline limitations.