MantisBT - CMake
View Issue Details
0014584CMakeCMakepublic2013-11-19 15:452016-06-10 14:31
Clinton Stimpson 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0014584: set() accepts invalid curly brace syntax
test.cmake contains:

set(myvalue "hello")
set(ENV{MYVALUE "${myvalue}")

Then I run it:
cmake -P test.cmake

and it doesn't say anything about the missing closing brace around MYVALUE.
No tags attached.
Issue History
2013-11-19 15:45Clinton StimpsonNew Issue
2013-11-19 15:49Brad KingSummaryCMake accepts invalid curly brace syntax => set() accepts invalid curly brace syntax
2013-11-19 15:51Brad KingNote Added: 0034496
2016-06-10 14:29Kitware RobotNote Added: 0042431
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0034496)
Brad King   
2013-11-19 15:51   
It looks like for the ENV{} syntax CMake blindly strips the last character assuming it is "}":

$ cat env.cmake
set(myvalue "hello")
set(ENV{MYVALUE "${myvalue}")
message("ENV{MYVALU}=[$ENV{MYVALU}]")

$ cmake -P env.cmake
ENV{MYVALU}=[hello]
(0042431)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.