-DFOO on the SWIG command line now sets FOO to 1

This is consistent with C/C++ compiler preprocessors.  Previously
SWIG set FOO to an empty value.

Fixes #2193
This commit is contained in:
Olly Betts 2022-02-06 10:18:49 +13:00
commit b06ab566cb
4 changed files with 18 additions and 1 deletions

View file

@ -0,0 +1,7 @@
%module command_line_define
// Test handling of -D without a value specified.
#if FOO-0 != 1
# error "-DFOO didn't set FOO to 1"
#endif