On 08/02/2016 02:11 PM, Chaoren Lin wrote: > Would changing ConvertToNinjaPath to output absolute paths paths work?
No, that will make all paths absolute. Ninja's design is pretty clear in that it prefers canonical relative paths when possible. Note that the conversion to a relative path by ConvertToNinjaPath is not unconditional. In an out-of-source build the paths to the source files in the source tree will be absolute. --- Compilers know the absolute path to all the files in a translation unit since the preprocessor was able to read them. They could be taught to produce absolute paths in their error messages to work better for IDEs regardless of how the build system invokes them. I've never really understood why they don't make error messages and debug info hold absolute paths. For some reason relative paths in these places are always blamed on the build system when in fact the compiler could easily produce them. -Brad -- 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-developers