[cmake-developers] VS10-12 generators deserve much more love

Brad King brad.king at kitware.com
Mon Feb 17 11:26:40 EST 2014


On 02/17/2014 11:11 AM, Dan Cristiu wrote:
> Are there any plans to move onto a more extensible approach in
> the future?

No, but there aren't plans to not do it either ;)

This is open source.  People write the features they need and
leave the rest for future work by others that have different
requirements and associated resources to support the work.

> Far away from project files which content gets
> created via code. Maybe a template style approach whereby
> generators simply point to templates which use the variables
> set up during the execution of the cmake scripts?

The VS 6 generator used this approach (see the Templates/
source dir).  It became problematic because adding features
required updating the templates and supported placeholder
replacement and then outside projects' templates would break.

> People could
> then create their local ones if they need to extend/customize
> them and push them to an unofficial public repository where
> others could download them, comment on them or improve
> them. Funny enough, even if these templates were actually CMake
> script files it would make a huge difference.

That would require exposing an API to get to all the details
encapsulated inside the generators.  The API would then have to
be supported and would limit our ability to internally refactor
things in the future.  It is similar to the problem we had with
the VS 6 .dsp templates mentioned above.  This problem will occur
with any approach that allows project code to integrate with the
generators at a low level.  It helps projects do what they need
in the short term but makes long-term maintenance much harder.

I'm open to improving the capabilities of the VS genertors but
do require that they remain implemented in C++ and that any
hooks for customization by project code remain declarative
(e.g. target properties).

Thanks,
-Brad




More information about the cmake-developers mailing list