-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:
parent
9d7c962ee8
commit
b06ab566cb
4 changed files with 18 additions and 1 deletions
7
Examples/test-suite/command_line_define.i
Normal file
7
Examples/test-suite/command_line_define.i
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue