How to define a symbol?

I want to programatically define a symbol FOO, such that the code “#if defined(FOO)” will evaluate to true during pre-processing.
How do I that?

I tried addMacroDef(“FOO”), and other methods, but to no avail.