MantisBT - CMake
View Issue Details
0009912CMakeCMakepublic2009-11-17 17:362016-06-10 14:31
bielow 
Bill Hoffman 
normalmajoralways
closedmoved 
CMake-2-8 
 
0009912: ampersands are not escaped in custom_commands comment section
I used the VS2010 Win64 Generator to build a sln file and got the following error when loading the sln file into VS2010B2:

my.vcxproj : error : Unable to read the project file "my.vcxproj".
my.vcxproj(104,48): The project file could not be loaded. An error occurred while parsing EntityName. Line 25, position 28.

This error is due to an ampersand in a post-build event comment:

24 <PostBuildEvent>
25 <Message>blabla & blabla</Message>

which is created like this:
add_custom_command(
TARGET OpenMS
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E echo ""
COMMENT "blabla & blabla" VERBATIM)


Removing the "&" solves the issue, but it should be escaped by cmake if thats possible (or removed).
In VS9 the original ampersand is escaped using html-style, i.e. "&", but it seems that VS2010B2 ignores this if I replace this manually within the vcxproj file - well at least no error.
No tags attached.
Issue History
2009-11-17 17:36bielowNew Issue
2009-11-17 17:44bielowNote Added: 0018467
2009-11-17 17:44Bill HoffmanStatusnew => assigned
2009-11-17 17:44Bill HoffmanAssigned To => Bill Hoffman
2016-06-10 14:27Kitware RobotNote Added: 0041621
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0018467)
bielow   
2009-11-17 17:44   
seems mantis interprets html ampersands, so read the last line as
> ... html-style, i.e. "& amp ;" ...
(0041621)
Kitware Robot   
2016-06-10 14:27   
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.