[CMake] Explanation....

Johannes Zarl johannes.zarl at jku.at
Thu Apr 24 04:53:04 EDT 2014


On Wednesday, 23. April 2014, 18:54:39, Matthew Woehlke wrote:
> > if (" ${arg}" STREQUAL " TOTO")
> 
> set(" TOTO" "evil")

You sure? When I checked, this did not work. Also, the following gives me a 
syntax error:

set (" foo" "Evil!")
message( "${ foo}")

  Syntax error in cmake code at
    /home/zing/scratch/cmake_testbed/CMakeLists.txt:100
  when parsing string
    ${ foo}
  syntax error, unexpected cal_SYMBOL, expecting } (7)

> See also
> http://permalink.gmane.org/gmane.comp.programming.tools.cmake.devel/9936.

This is totally different, in that it uses an unsafe prefix. Just like the 
"_ASDF_" I used in my first response, the "x" *can* be the beginning of a 
variable name. The space can not start a vaariable name.

Cheers,
  Johannes


More information about the CMake mailing list