How can I use Catch2 to test my CMake static library project?
问题 I'm writing a static library which contains some shared code between several projects. In order to verify that the code in this library functions properly I'd like to use Catch2 to do some unit testing on it. Unfortunately, when attempting to run the tests I run into the problem that the compilation's output file is a shared library (.a), rather than an executable. I'm sure I can create a separate project which uses the functions from my static library, and subsequently run tests that way,