[CMake] CMake + UIC files -- Is this a bug with CMake or with me?

Michael Wild themiwi at gmail.com
Thu Jul 22 11:18:14 EDT 2010


On 22. Jul, 2010, at 17:07 , kent williams wrote:

> It's perfectly clear to me now, but I bet I'm not the first (or last!)
> person to run into issues like this and get roadblocked.
> 
> Every software task seems to have its stumbling block.
> 
> In Medical Image Processing we spend a lot of our time debugging
> issues related to how image volumes are oriented/organized with
> respect to anatomy.  In C++ programming, you spend a lot of your time
> debugging template programming, which produces awful error messages
> when it goes wrong.  In any shell/scripting language (which CMake is,
> at least in part) you devote a lot of time to where to put things in
> quotes, how to deal with spaces inside tokens, etc.
> 
> On Tue, Jul 20, 2010 at 4:30 PM, Andreas Pakulat <apaku at gmx.de> wrote:
>> On 20.07.10 16:18:26, kent williams wrote:
>>> OK, so set_source_file_properties needs a property value that's a
>>> single string.  This wasn't clear from the documentation at all or not
>>> clear to me at least. Thanks for your help!
>> 
>> It doesn't need to be explicit if you've understood cmake variables (yes
>> thats not exactly and easy and straight-forward topic). The problem is
>> that when you have multiple values in a varialy "xyz" and you pass it as
>> ${xyz} to the function, it'll get expanded and as
>> set_source_files_properties allows multiple properties to be set it
>> takes the second (third, fourth etc.) element of the list you've passed
>> in as next property name instead of value to the first property. Using
>> the quotes you make sure that cmake understands that all individual
>> elements from the list belong to the same "value" position in the call
>> to the set-function.
>> 
>> Andreas

Thats why I am very liberal with quoting (even if it isn't strictly necessary) and only leave it away if I specifically WANT special behavior. Much easier to remember and less surprises...


Michael


More information about the CMake mailing list