Hacker News new | ask | show | jobs
by banachtarski 1917 days ago
> due to cmake insisting on using absolute file paths

????

1 comments

I can't tell you whether this is/was innate cmake behavior or whether something was wrong with the specific project, but cmake passed all source file names to the compiler using the full file system path rather than a relative path.

This is a serious (though slowly becoming a non-issue) problem since compilers encode source file names into the output binary's debug information and strings (__FILE__). The "-fdebug-prefix-map=old=new" GCC option and its cousins are what is slowly making this a non-issue, but those are a relatively recent addition.

It is generator-specific. Try "Unix Makefiles" vs "Ninja" and you'll see the difference.