[CMake] Coverage support
Rolf Eike Beer
eike at sf-mail.de
Mon Aug 7 07:37:33 EDT 2017
Am 2017-08-07 11:06, schrieb Clément Gregoire:
> I usually stop reading Cmakelists.txt as soon as I see this
>
> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -pthread -g -O0
> -fprofile-arcs -ftest-coverage")
The pthread thing there is likely wrong anyway, and the -Wall is
entirely optional. The other things are needed, otherwise gcov will not
produce any useful output.
> Also you need to use the SETUP_TARGET_FOR_COVERAGE for every single
> test
> target, which seems to be a difficult to scale on big projects
No, you don't. It's entirely fine if you just run "make test" as I do in
OSM2go.
Eike
More information about the CMake
mailing list