You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is perfectly fine, but it should be identical to just using the doctest.h header directly - by default including doctest.h is the same as including just doctest_fwd.h and the generated .o files should be the same.
Also the default cmake files provide a static library you can directly link to: doctest_with_main
Let me make it more clear, I guess puting doctest.h in my main.cpp will cause that, each time main.cpp is compilied (not linking), the functions/classes inside doctest.h will be compiled again. Not very clear about how much time it will cost, but I think it may save time. Also considering that there are more .cpp files in my project, then I would like to keep the compilation output as small as possible. Thus, I thought using doctest as an library would be more suitable for me.
Yes, including doctest.h, the header-only manner, will be suitable for many other situation.
Just feeling everytime including
doctest.h
is too large for generated .o fille.Browsing the official CMakeLists.txt, feeling too complicated.
What if I just use doctest like the following? What features/details will be affected, comparing to using the default provided
doctest.h
?src/main.cpp
The text was updated successfully, but these errors were encountered: