Environment: Centos 64bit Question is: Currently, the makefiles generated by cmake generate object files that contains the source suffix (.c, .cpp), for example do_stuff.c gets compiled to do_stuff.c.o. How do I change it so that cmake generates makefiles that generates do_stuff.o (without the .c)
Some Background: I’m trying to set up a project to generate code coverage. The issue I’m running into now is that the .gcno and .gcda files that are generated at compile and runtime contain the source file suffixes. For Example: Cmake generates a makefile to compile do_stuff.c. When I run make, it generates do_stuff.c.o. This then generates do_stuff.c.gcno. When I run the unit test, it generates do_stuff.c.gcda. On the surface, this isn’t a problem. However, we are using cobertura, which uses gcov, which assumes that the the coverage file names do not contain the suffix. That is, it wants do_stuff.gcda and do_stuff.gcno. By default, gcovr cannot find any coverage or run files, and so the code coverage is broken. If I manually run the compile command and set the –o to do_stuff.o (as opposed to do_stuff.c.o) it all works as expected. I can think of some linux script hacks that I can run to do all sorts of softlink magic to get it to work, but ideally I’d like to fix this within cmake. Thank you, -Dave
-- 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