Hi,

My cmake 1.1 PortGroup has been committed very recently, and we're still 
readying a new version of port:QtCurve as a first real-life test of some of its 
new features.

I just realised we missed a feature that could have been implemented too: 
control over CMake's generator.

In short:

- CMake can generate ninja build files. This is supposedly (much) faster, even 
for one-time builds
- When using the standard (Unix Makefiles) generator, destroot.target could be 
set to "install/fast" which only installs the build result but doesn't verify 
if anything has to be rebuilt. This too can give a significant speed-up for 
large, complex projects. This could (should) be the default for destroot.target 
since we should be able to assume safely that the destroot phase is entered 
only after a successful build.

Reason I'm posting here is that I'm not sure how best to implement this. What I 
have in mind if a procedure that is called with the generator name, and that

- when called with "ninja", adds a build dependency on port:ninja and (re)sets 
"default destroot.target install"
- when called with "Unix Makefiles", removes port:ninja from the build 
dependencies and (re)sets "default destroot.target install/fast".
- raises an error when called with anything else until someone finds a reason 
to implement support for other build generators.

I have a hunch there might be a more elegant way to do this, but I'm not enough 
of a Tcl expert and intimate with the base layer to know how.

Thanks,
R.

Reply via email to