[cmake-developers] Using CMake generated ninja file as a subninja file

Ben Boeckel ben.boeckel at kitware.com
Fri Jan 22 11:50:48 EST 2016


On Fri, Jan 22, 2016 at 17:34:03 +0100, Nicolas Desprès wrote:
> I have pushed a first draft of the patch here:
> 
> https://github.com/nicolasdespres/CMake/commit/67a4faad47378c07c97a29dd229d6f9fa500763b
> 
> I have tested with a small project and it looks good.

Looks like a good start to me as well. I added some comments on the
commit.

> I would like to add some regression tests but I don't know from where to
> start.
> 
> The principle would be to duplicate and modify existing tests so that
> CMAKE_NINJA_OUTPUT_PATH_PREFIX is set to "sub/" and the build directory is
> changed from _build to _build/sub. A dummy build.ninja file containing
> "subninja sub/build.ninja" should be generated in _build/build.ninja and
> ninja should be called from _build instead of _build/sub.
> 
> It would be great if you could point me some existing tests that could
> serve as a base to do the above.

The RunCMake test infrastructure would probably be the best place to
start. It could be modified to do some of this work.

Thanks,

--Ben


More information about the cmake-developers mailing list