Hello,

is it possible to tell CMake to write relative source file paths in the
debug information of an object file (aka .mdebug section)?

Here's a sample object file:

$ strings -a build/CMakeFiles/config.dir/src/strbuf.c.o | grep home
/home/foo/bar/src/strbuf.c

Instead of the absolute file path, I'd like to see "src/strbuf.c" or
"strbuf.c".

This is especially interesting when providing binaries that can be
debugged by other people with different file paths.

Maybe it's a special gcc option?

Btw, CMAKE_USE_RELATIVE_PATHS doesn't do it.

-Mathias

_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to