Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctest implementation as static library #77

Closed
ymadzhunkov opened this issue Jun 26, 2017 · 0 comments
Closed

doctest implementation as static library #77

ymadzhunkov opened this issue Jun 26, 2017 · 0 comments

Comments

@ymadzhunkov
Copy link
Contributor

Add cmake target - doctest implementation as static library

I am using doctest in several projects ( at home and at work ). As number of tests grow, compile time grows, because doctest implementation is compiled multiple times. In order to save compile time, I created a static library and linked it in all my tests executables. I want to move build of this static library in doctest repo, so I can reuse it all my projects.

My workflow is as follows (doctest is submodule in my git repo)
In my main CMakeLists.txt

SET(DOCTEST_WITH_TESTS OFF CACHE BOOL "Build tests/examples" FORCE)
add_subdirectory(doctest)

Adding Unit test whenever is needed

add_executable(${UNIT_TEST} ${ARG_TEST_SOURCES} )
target_link_libraries(${UNIT_TEST} doctest_with_main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant