[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] Explanation....
From: Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date: 2014-04-28 16:48:40
Message-ID: ljm0p8$v3m$1 () ger ! gmane ! org
[Download RAW message or body]
On 2014-04-28 04:58, Johannes Zarl wrote:
> I'm always happy to learn something new. How would you manage to make the
> following if statement trigger?
>
> set( arg "value")
> if (" ${arg}" STREQUAL " TOTO" )
> message ( "arg equals 'TOTO', and arg equals 'value'" )
> endif()
Exactly how you would expect:
set(" TOTO" " value")
...and it does trigger:
$ cmake -P evil.cmake
arg equals 'TOTO', and arg equals 'value'
> No, but the if statement didn't trigger, either.
Well, yes, but that's because I caused arg to be compared against 'evil'
instead of 'TOTO'. Since arg is set to 'value', it still didn't match.
The previous "example" was more metaphorical.
--
Matthew
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic