On Monday, December 07, 2015 21:46:28 Martin Weber wrote:
> Am Sonntag, 6. Dezember 2015, 20:25:18 schrieb Doug Schaefer:
> ...
>
> > >> In the cmake4cdt plugin, I use the output of cmake
> > >> -DCMAKE_EXPORT_COMPILE_COMMANDS=on to feed the include paths into the
> > >> indexer. I just checked that cmake also produces the
> > >>
> > >>compile_commands.json
> > >>
> > >> file when using the ninja generator (at least on linux).
> > >
> > >AFAIK, compile_commands.json is written when the cmake-makefle generator
> > >or
> > >ninja-generators is used. Not sure whether the file is written when the
> > >mingw,
> > >msys or cygwin generator is used.
> >
> > We¹re at the point now that we should probably find out exactly where it¹s
> > generated or not.
>
> Generated with the UnixMakefiles and Ninja generator only, according to [1].
> Cmake on windows provides a mingw, msys, UnixMakefiles (for cywin), nmake
> and ninja buildscript generator [2].
The variable CMAKE_EXPORT_COMPILE_COMMANDS is used in
void cmMakefileTargetGenerator::WriteObjectBuildFile(...), which should be used by all Makefile generators, on all platforms.
(same for ninja)
Alex