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

Reply via email to