I have a CMake project separated in three parts:
- Compilation of my libraries
- Compilation of many unit tests programs testing each precise subpart of those libraries
- Compilation of program samples using those libraries
My question is about the 2nd part. My unit tests executables are short binary programs with a main
returning 0 on success, 1 on fail. I would like to integrate their running as part of the build.
Is it possible to use CMake to do one of those two solutions:
- Run every unit test program and check return values and generate an error if any fail.
- Generate a test script that would run and check every unit test program and check return values to yield an error if any fail.
I'm not looking for a complete CMake script code, a simple indication on what is possible with a link to corresponding documentation would be enough.
Aucun commentaire:
Enregistrer un commentaire