[cmake-developers] Supported targets with the ninja generator ?
Alexander Neundorf
neundorf at kde.org
Tue Apr 3 16:03:02 EDT 2012
On Tuesday 03 April 2012, Alexander Neundorf wrote:
> On Tuesday 03 April 2012, Alexander Neundorf wrote:
> > Hi,
> >
> > which "additional" targets are supported with the ninja generator ?
> >
> > The "help" target does not seem to be supported. This would be nice.
> >
> > With Makefiles, for every target foo there is also a target foo/fast.
> > This seems to be not supported currently. Is it planned ?
> >
> > With Makefiles, there are targets to
> > - compile a single source file foo.c -> foo.o
> > - preprocess a single source file foo.c -> foo.i
> > - assemble (actually compile but do not assemble) a single source file
> >
> > foo.c -> foo.s
> >
> > Those also seem not to be supported currently.
> > Is this planned ? It would be nice.
>
> cmGlobalNinjaGenerator.h contains:
>
> virtual const char* GetCleanTargetName() const { return "clean"; }
>
> but there actually no "clean" target:
> tests/build-hello-eclipse-ninja$ ninja clean
> ninja: ERROR: unknown target 'clean', did you mean 'ninja -t clean'?
>
>
> Maybe it shouldn't return a valid string, since it does not really have a
> "clean" target ?
And one more comment: a nice feature of the makefile generators is that they
don't only have one global "clean" target, but you can clean per-directory
(via make clean in a subdir), and even per target
(cmake -P CMakeFiles/foo.dir/cmake_clean.cmake).
Having these per-target clean scripts available would be really nice.
Alex
More information about the cmake-developers
mailing list