foonathan / memory

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.
https://memory.foonathan.net
zlib License
1.5k stars 195 forks source link

Build error because of doctest #135

Closed kistlin closed 2 years ago

kistlin commented 2 years ago
In file included from foonathan_memory-shared/src/memory-0.7-1/test/test.cpp:6:
foonathan_memory-shared/src/memory-0.7-1/build/_deps/doctest-src/doctest/doctest.h:4299:47: error: size of array ‘altStackMem’ is not an integral constant-expression
 4299 |         static char             altStackMem[4 * SIGSTKSZ];
      |                                               ^
make[2]: *** [test/CMakeFiles/foonathan_memory_test.dir/build.make:76: test/CMakeFiles/foonathan_memory_test.dir/test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:361: test/CMakeFiles/foonathan_memory_test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

This can be fixed by simply fetching the latest version of doctest.

Replace

FetchContent_Declare(doctest URL https://github.com/onqtam/doctest/archive/2.4.5.zip)

with

FetchContent_Declare(doctest URL https://github.com/doctest/doctest/archive/refs/tags/v2.4.8.zip)

in test/CMakeLists.txt.

foonathan commented 2 years ago

Yeah, I'm aware. I can't update it yet because of doctest/doctest#606 which breaks CI.

MiguelCompany commented 2 years ago

@foonathan doctest had a release in June. Perhaps this can now be solved

foonathan commented 2 years ago

Thanks for the reminder; fixed it.

MiguelCompany commented 2 years ago

@foonathan Do you think it is time for a new release?

foonathan commented 2 years ago

Yeah, I'll tag one later today.