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
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to