提交 9578a382 编写于 作者: J John Lindgren

Fix "rake scripts" when running on Windows.

cmd.exe does not recognize backslash as an escape character,
leading to errors like the following:

    error: stray '\' in program
    note: in definition of macro 'UNITY_OUTPUT_CHAR_HEADER_DECLARATION'

It does, however, recognize double quotes, so we can use those as
a portable method of escaping special characters on both Windows
and UNIX.
上级 46263fc1
......@@ -91,7 +91,7 @@ module RakefileHelpers
defines = if $cfg['compiler']['defines']['items'].nil?
''
else
squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=putcharSpy'] + ['UNITY_OUTPUT_CHAR_HEADER_DECLARATION=putcharSpy\(int\)'] + inject_defines)
squash($cfg['compiler']['defines']['prefix'], $cfg['compiler']['defines']['items'] + ['UNITY_OUTPUT_CHAR=putcharSpy'] + ['UNITY_OUTPUT_CHAR_HEADER_DECLARATION="putcharSpy(int)"'] + inject_defines)
end
options = squash('', $cfg['compiler']['options'])
includes = squash($cfg['compiler']['includes']['prefix'], $cfg['compiler']['includes']['items'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册