MCPcopy Create free account
hub / github.com/Kitware/CMake / cmVS10EscapeComment

Function cmVS10EscapeComment

Source/cmVisualStudio10TargetGenerator.cxx:216–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214};
215
216static std::string cmVS10EscapeComment(std::string const& comment)
217{
218 // MSBuild takes the CDATA of a <Message></Message> element and just
219 // does "echo $CDATA" with no escapes. We must encode the string.
220 // http://technet.microsoft.com/en-us/library/cc772462%28WS.10%29.aspx
221 std::string echoable;
222 for (char c : comment) {
223 switch (c) {
224 case '\r':
225 break;
226 case '\n':
227 echoable += '\t';
228 break;
229 case '"': /* no break */
230 case '|': /* no break */
231 case '&': /* no break */
232 case '<': /* no break */
233 case '>': /* no break */
234 case '^':
235 echoable += '^'; /* no break */
236 CM_FALLTHROUGH;
237 default:
238 echoable += c;
239 break;
240 }
241 }
242 return echoable;
243}
244
245static bool cmVS10IsTargetsFile(std::string const& path)
246{

Callers 3

WriteCustomRuleMethod · 0.85
WriteEventMethod · 0.85
WriteSdkStyleEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…