> If you know /path/to/build why not just interpret relative paths with > respect to it as a heuristic? If the paths exist then use them.
It's... a bit complicated. Our IDE (Android Studio) calls another build system (Gradle) which in turn calls CMake to trigger the build. So the IDE itself doesn't see the build path, only the failure output. Also, in the case of vim, the makeprg is user-supplied, so vim has no idea that it contains a path. > Another approach is to use ConvertToNinjaPath for all the build.ninja > inputs and outputs on build statements but use something other than $in > for the source file on the compilation rule. Using an "IN_ABS = ..." > variable could achieve this. Thanks, I'll try this. On Wed, Aug 3, 2016 at 5:56 AM, Brad King <brad.k...@kitware.com> wrote: > On 08/02/2016 04:42 PM, Chaoren Lin wrote: > > Our IDE uses "cmake --build /path/to/build" to invoke the build, > > so that we only have to deal with CMake and not the underlying build > system. > > If you know /path/to/build why not just interpret relative paths with > respect to it as a heuristic? If the paths exist then use them. > > > Maybe I can try to fix ninja to resolve paths before sending them to the > compiler. > > The ninja build tool itself does not have enough information to make > such a transformation. CMake does though. See below. > > > Or maybe just add a flag to ConvertToNinjaPath or something. > > ConvertToNinjaPath is called from several places that don't all know > whether the file they are passing is a source file for compilation > or not. > > Another approach is to use ConvertToNinjaPath for all the build.ninja > inputs and outputs on build statements but use something other than $in > for the source file on the compilation rule. Using an "IN_ABS = ..." > variable could achieve this. > > -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