Open AidanBeltonS opened 1 month ago
Catch2 can be built as a shared lib, but I don't try to support it past using CMake-provided utility to make every symbol visible -> if that fails, the user is on their own.
As for BUILD_SHARED_LIBS
, Catch2 tries to use the standard CMake configuration options. This does mean that if you include it as a subproject, it will use the same configuration, because it is global. If you need something different, you have to undo it yourself.
Describe the bug Catch 2 builds its libraries as a shared library, when using
BUILD_SHARED_LIBS=ON
and pulling the repo viaFetchContent
.Expected behavior It seems the v3 library is supposed to work only as a static library. Correct me if I am wrong. So regardless of the project that uses Catch2, the Catch2 library should build as a static not shared library.
If this is expected behaviour, please close this issue.
Reproduction steps
Additional context I have not encountered any specific problem with it being a shared library, however it seems like an error to have the parent CMake effect the Catch build in this way.