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. I'd rather have a policy to drop the auto-lookups for quoted arguments so that if("${x}" STREQUAL "${y}") works as expected. Also the keywords like TARGET, EXISTS, etc. should work only when not quoted. -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