supposing I have a contract declaration in file t.cpp
as follows:
class [[eosio::contract("__CONTRACT__")]] token : public contract {
I would expect to be able to compile it like this:
$ eosio-cpp -D__CONTRACT__=t t.cpp -o t.wasm --abigen
but when I try, I get an empty ABI file.
if I look at what the preprocessor is producing:
$ eosio-cpp -D__CONTRACT__=t -E -dD t.cpp -o - |grep __CONTRACT__
it looks right:
> #define __CONTRACT__ t
> class [[eosio::contract("__CONTRACT__")]] token : public contract {
and I get further confirmation because if I specify the name during compilation everything works just fine:
$ eosio-cpp t.cpp -o t.wasm --abigen --contract=__CONTRACT__
so are preprocessor symbols just not supported by eosio-cpp as they are in standard C/C++ compilers?