[CMake] CMake single rule instead of multiple

Alexander Neundorf a.neundorf-work at gmx.net
Thu Apr 10 16:42:00 EDT 2008


On Thursday 10 April 2008, Praveen Kannan wrote:
> Hi,
>
> I am a newbie to CMake and I am very impressed by this tool.
>
> There is one thing that I am a bit concerned about.
>
> I used a sample Qt 3 based project to evaluate CMake and used the FindQt3
> package to do my work. Works great! However under Visual Studio 2005 I do
> end up seeing many CMake rules to convert the ui file to .cpp and .h and a
> separate set of rules for generating the moc_*.cpp files.
>
> My questions are:
> 1. Is there a way to generate a single rule for the entire file set of UI
> and use it?

I think there must be one rule per file, excep tif you add some special 
handling (hacks).

> 2. What will be the downside of having so many rules?
>
> The reason for my concern is as follows. Now I want to start writing macros
> that will transform a file from one format to another for some custom
> language that we have in our product. Lets say that the input is of *.abc
> and the output is *.xyz. Now in our system we have over 10,000 such files
> and if that macro ends up generating over 10,000 rules what will be the
> impact on the underlying build system (i.e. Visual Studio or gmake)? And

For make it is no problem. 
I don't know about Visual Studio.
(at least ParaView, which uses Qt4, is also built using cmake and I guess 
there are developers using Visual Studio).

Alex


More information about the CMake mailing list