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.
E.g., if we have a project and its build directory structured like this: project/ CMakeLists.txt src/ foo.cpp build/ CMakeCache.txt CMakeFiles/... build.ninja build.ninja will contain something like this: build CMakeFiles/foo.dir/src/foo.cpp.o: CXX_COMPILER_foo ../src/foo.cpp 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. 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? Thanks, Chaoren
-- 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