<div dir="ltr">Hi, currently if the build directory is under the project's root, and the generator is ninja, the generated build files will use relative paths from the build directory for the source files.<div><br></div><div>E.g., if we have a project and its build directory structured like this:<div><br></div><div>project/</div><div>    CMakeLists.txt</div><div>    src/</div><div>        foo.cpp</div><div>    build/</div><div>        CMakeCache.txt</div><div>        CMakeFiles/...</div><div>        build.ninja</div><div><br></div><div>build.ninja will contain something like this:</div><div><br></div><div>build CMakeFiles/foo.dir/src/foo.cpp.o: CXX_COMPILER_foo ../src/foo.cpp</div></div><div><br></div><div>Now, when you build, and get a compile error, the reported path would be relative to the build directory. This is a somewhat problematic if the build is being run through an IDE that has no concept of the build directory (e.g., it's only supplied with a build command, no concept of what's in the command), since the IDE then can't do anything with the relative path that comes out of the compiler error. The IDE won't be able to open the correct source file when receiving the error.</div><div><br></div><div>Currently source files in the ninja generator are converted to "NinjaPath" which are just full paths converted to HOME_OUTPUT. Is there a reason we can't just always use full paths for the source files?</div><div><br></div><div>Thanks,</div><div>Chaoren</div></div>