[cfe-dev] compile_commands.json for Windows/MSVC

Richard legalize at xmission.com
Tue Aug 13 11:02:37 PDT 2013


In article <CACs=ty+Bzw=1ZdNYhBRmSBDqt_y_O19dFd1Rb+hKj8EohZBykQ at mail.gmail.com>,
    Reid Kleckner <rnk at google.com> writes:

> On Tue, Aug 13, 2013 at 12:08 AM, Richard <legalize at xmission.com> wrote:
> 
> > > What generator (-G) are you using?
> >
> > When I originally created the build structure, I generated VS 2012
> > project files.
> 
> 
> Searching the CMake source, I only see mentions of
> CMAKE_EXPORT_COMPILE_COMMANDS in the make and ninja generators.  The
> feature is probably unimplemented for Visual Studio project files.

OK, I'm a little confused.  The page that explains how to generate
this json file doesn't mention anything about generators or -G.

Are the directions on the page simply assuming somethign that isn't true
in this case?

> ninja works fairly well with the MSVC toolchain so you could try that.

I don't need to actually change the way I'm building the code -- I
still want VS projects for building the code.  I just need to create
this JSON file.

As I understand it, this JSON file feeds clang all the necessary
include search paths and relevant preprocessor symbol definitions in
order to properly interpret the source code in a particular
compilation context.
-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>



More information about the cfe-dev mailing list