[cmake-developers] Creating a Keil uVision generator

Brad King brad.king at kitware.com
Mon Jan 9 14:48:27 EST 2017


On 01/02/2017 06:27 PM, Paul Wilkinson wrote:
> As with the Visual Studio generators, a generator for uVision projects would
> ideally be a multi-configuration generator.

Yes, the layouts sounds similar.  A uVision project generator implementation
could be modeled after the VS 2015 generator.  It would be nice to use the
cmXMLWriter for the actual writing of the files if they are XML syntax
(the VS generator would ideally do this too but pre-dated the helper).

> I expect there are many concepts in CMake that wouldn't map to a uVision option,
> and vice-versa. For example the "Packs" system used by uVision might not mesh
> well with what CMake understands as a library.

This may be a problem.  Unless CMake's buildsystem model:

 https://cmake.org/cmake/help/v3.7/manual/cmake-buildsystem.7.html

can be mapped cleanly to uVision project files then it may not be a good fit.

> For my limited requirements -- a
> single project workspace, where the project consists of exactly one executable
> and no libraries other than some third-party libraries passed to linker -- I
> expect we could make do with a skeleton/template .uvprojx and the CMake
> generator would fill in the gaps for the source files.

Unfortunately that case sounds so limited that a special case to support it
would not be appropriate for inclusion in CMake.  Way back in the VS 6 days
when CMake started we used template project files for generation, and they
were very painful to maintain and extend.

Thanks,
-Brad



More information about the cmake-developers mailing list