Source Files Path in Executable

I am using CMake to build a large project. The source directory is /home/user/project and the build directory is /home/user/project/build/linux.

In the final executable generated when I look at the DW_AT_name it is /home/user/project/app/src/app.cpp and the DW_AT_comp_dir is /home/user/project/build/linux/app/.

Debuggers look for source files at DW_AT_comp_dir/DW_AT_name which results in the incorrect path /home/user/project/build/linux/app//home/user/project/app/src/app.cpp

How to fix this issue?

AFAIK, CMake provides no abstraction for this. Can you reproduce it with a small example project?

Ah, I see Incorrect Source File Paths now.

Closing this one.