On Thursday 14 March 2013, Brad King wrote:
> On 03/14/2013 03:47 PM, Alexander Neundorf wrote:
> > I pushed the AddEqualOperator to stage, it adds the == operator to if(),
> > which simply string-compares the both arguments, with no variable lookup
> > (... which can lead to unwanted effects when using STREQUAL)
> > 
> > Does that look like a good solution ?
> 
> It adds yet another interface to the if() command.  Syntactically
> the name "==" tells me nothing about how the comparison is done,
> and we don't have typed values.  Once "==" is there people will
> want <,<=,>,>=,etc. and they will all have the same ambiguity as
> to how values like "0" v. "0.0" are handled.

Yes, I am aware of all that, I was thinking even about adding <, >, etc.

I know that adding == is not the ideal solution, I'd also a prefer if STREQUAL 
wouldn't have the issue it has.

Still simply adding == has its advantages:
- it implements the behaviour probably most people expect
- it shouldn't be able to break anything
- the syntax is nice
- it doesn't need a policy, existing behaviour doesn't change
- minimal implementation effort, i.e. we could have it right now

Alex
--

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