[cmake-developers] ninja/make compilation response file

Ben Boeckel ben.boeckel at kitware.com
Mon Apr 4 13:01:02 EDT 2016


On Mon, Apr 04, 2016 at 15:59:30 +0000, Dmitry Ivanov wrote:
> We have a strange situation where we do have too many include paths,
> which makes command line for obj compilation too long on windows (more
> 32kb).
> I've tried using set(CMAKE_NINJA_FORCE_RESPONSE_FILE 1), but
> apparently after checking cmake upstream I've realized that it's only
> implemented for linking, and not compilation.

Hmm. I know that RC compilation doesn't support response files (though
the rc compiler does on Windows). Haven't had a problem with source
compilation though (and I've had to deal with *long* paths before).

> What we should do (other than fixing "the problem" with too many
> paths) ? Would be nice to have this feature working for makefiles and
> ninja.

Teaching the Ninja generator about response files for object file
compilation would be the way to go (and support for RC as well would
be good since the logic is likely the same).

> PS. Can we do something about bloated cmake ninja generator ? in our
> case cmake generates 1.8 Mb Makefile and 84 Mb build.ninja, though
> ninja is still faster than make even in this case.

There was work to reduce the size of the generated build.ninja file.
More work could be done, but the projects I was looking at would only
get marginal improvements from other techniques (though other projects
with different flag quantities might show other things to improve). What
version of CMake are you using?

--Ben


More information about the cmake-developers mailing list