Brad King wrote:

> On 08/10/2012 10:30 AM, Stephen Kelly wrote:
>> I've updated the branch with the API change to use std::set. The XCode
>> generator does not use the cmLocalGenerator::AppendDefines method, but
>> the VisualStudio6Generator does.
> 
> That wasn't quite what I had in mind.  The string of escaped
> defines for the command line should be paired with a set of
> raw defines.

I'm not a fan of duplicating the information so much, and having to pass 
both a set and a string to the method to be modified to contain the define.

I uploaded a compromise compile-definitions-unique branch to my gitorious 
(g...@gitorious.org:~steveire/cmake/steveires-cmake.git) which stores the 
unescaped definition in the set, and escapes it in the JoinDefines method.

I'm not certain what behavior change you are referring to in the case there 
is no duplicate (Ordering?).

Thanks,

Steve.

> Before appending definition to the end of the
> string test set insertion:
> 
>   if(defined.insert(def).second)
>     {
>     // first time we see this one
>     ...rest of logic to append to "defines" string.
>     }
> 
> That way no behavior changes unless there is a duplicate.
> IMO it is also cleaner to store the unescaped original
> definitions in the std::set.
> 
> -Brad

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to