This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
Use file(GENERATE) to create a CTestConfig file #7
Labels
critical 🚨
All hands on deck, this is a show stopper!
✨ enhancement ✨
New feature or request
modules 🔮
Public API
tools 🛠️
Tooling Support
Projects
Milestone
Calling
include(CTest)
breaks a lot of stuff in what would be an otherwise normal build situation. One particular issue is that by callingenable_testing()
, we can no longer make a custom target namedtest
that also builds the unit test executables. In some places this build-and-run-tests target is calledcheck
, however we would likecmake --build check
to be designated forclang-check
. As such, we need to override all the CTest related machinery, including generating a CTestConfig file. We can do this viafile(GENERATE)
, much like we would like to in #6. One additional feature we get out of this is the ability toignore ctest altogether. This will let us do things like hook into other project's unit test runners, or submit additional information to a code coverage service, such as codecov.
The text was updated successfully, but these errors were encountered: