On 06/01/2012 12:22 PM, Bill Hoffman wrote:
> Can you explain to me what this test actually does?  I guess it is 
> running a compile command without the build tool?   Looks like you are 
> using a c++ program to run the compiler.  I think you need to go to 
> POSIXs paths to run the command and that should work.  You have a string 
> with \ in it, and you need to change it to /.   Not sure why ninja fails 
> and nmake does not...

It's testing the CMAKE_EXPORT_COMPILE_COMMANDS option:

 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeGenericSystem.cmake;hb=v2.8.8#l55

originally added here:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0e6b05fc
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7039d1fd

and that the Ninja-EXPORT_COMPILE_COMMANDS topic enables in the
Ninja generator.

The generator is supposed to produce a file that lists all the
compiler invocation command lines in a JSON format.  The test
runs a build with the option and then runs a program that reads
the generated file and re-plays the commands.  The test and its
C++ program should not need modification because it works for the
Makefile generator.  The Ninja generator will need to generate
the properly encoded commands like the Makefile generator does.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to