doctest: disable tests on isStatic platforms

Without the change `doctest` can't be built as
https://hydra.nixos.org/build/311427996:

    [ 80%] Linking CXX shared library libimplementation.so
    ld: crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
    ld: failed to set dynamic section sizes: bad value
    collect2: error: ld returned 1 exit status

Thus is fail `nixStatic` and `lixStatic` packages
in `master`. Let's disable tests that require
stared libraries.

ZHF: #457852
This commit is contained in:
Sergei Trofimovich
2025-11-05 22:43:47 +00:00
parent 146b74e1d3
commit bc905dffb2
+6
View File
@@ -29,6 +29,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [
# One of the examples tests shared library support
# and fails linking.
"-DDOCTEST_WITH_TESTS=OFF"
];
doCheck = true;
# Fix the build with LLVM 21 / GCC 15.