A particular header for which mocs are to be generated has only relevant content if a particular define is being done:
Inside the UT Makefile, I already added -DINCLUDE_L3 to make the UT compilation succeed for the FUT that includes this particular header.
Howhever, when I try to generate mocs out of this file, I do not know how to instruct the moc generation inside generate.sh to do also that define.
I tried export INCLUDE_L3=1 within generate.sh
I tried INCLUDE_L3=1 $OPMOCK_SH
None of this is successfull.
I am unable to edit the original header file (third party sw), so I guess I am forced to make a local copy of it...to get rid of below error
YYY_stub.c:11: warning: \u2018opmock_reset_all_mocks_in_this_header\u2019 defined but not used
YYY_stub.c:15: warning: \u2018opmock_verify_all_mocks_in_this_header\u2019 defined but not used
Adding to generate.sh below sed cmd is working:
sed '/#if defined(INCLUDE_L3)/i #define INCLUDE_L3'
But then I get: yyy_temp.h:54:1: error: "INCLUDE_L3" redefined