How to define C++ macro with value?

It should be done with cppCompiler.define, but it insists on wrongly escaping double quotes. It either does not insert them at all (-DFOO=bar) and therefore the macro is not expanded to string literal, or it adds escaped double-quotes (-DFOO=\"bar\"), which is also wrong. Is there some way around this?

Is this problem related to this?

Sorry, I was looking at wrong place, cppCompiler.define "FOO", "bar" correctly #defines macro named FOO to be expanded to string literal "bar".