Closed drjensbd closed 8 months ago
First, I'm sorry no one answered this in a timely manner.
For those coming to this issue: If you're using Ceedling, you can just enable the preprocessor option. If not, you'd have to preprocess the file yourself before calling CMock. We hope to someday have a full C parser built into C which allows for this sort of feature. This is already captured in other issues, so I'm closing this one.
Hello! I have a header from the Zephyr library, 'i2c.h' which has recently been updated with Zephyr 3.0.0. Now, CMock fails to parse this file due to macros in the header. These are the macros in question:
The error:
CMock seems to interpret the multiline statements as a single function, and fails. The macros are enclosed in an
#if defined
block, is there a way to run preprocessing on the header before CMock attempts to parse?Or are there any other ways to solve this?