Hello Theo,

On Friday, 11. April 2014, 14:20:36, Theodore Papadopoulo wrote:
> ::-B-::  <- This shows that B is indeed parsed as OPTIONAL
> 
> A
> A        <- Fine I'm in the else part of the if
> OPTIONAL
> HERE     <- Fine.

... I guess "OPTIONAL" should read "TOTO". You say it's fine, but it's 
probably not what you expected.

Let's take this step by step:

if ("${arg}" STREQUAL "TOTO")
-> if ("TOTO" STREQUAL "TOTO")
-> if (B STREQUAL B)

So, the expression evaluates to true.

> B
> HERE     <- ???????

Now this should not come as a surprise:

if ("${arg}" STREQUAL "TOTO")
-> if ("B" STREQUAL "TOTO")
-> if ( B STREQUAL B)

You could add a prefix to your if expression (I'm sure you have seen this 
technique in configure scripts*g*):

if ( "_ASDF_${arg}" STREQUAL "_ASDF_TOTO")

HTH,
  Johannes


P.S.: To get better visibility on mailing lists, it's best if you start a new 
thread instead of just replying to a message and changing the subject line.


-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to