Replies: 1 comment 1 reply
-
I have a hackyish way to do this for an internal library that I do a little bit differently just with defining specific variables, but I think it will work for you. You can leverage environmental defines and use them to change defines in your code. For your specific case, I'd suggest using the env variables to include additional headers like so.
Once you have the variables sorted out that way, add it to your defines and you can write a script to set the variable/overwrite it. Because it's kind of intensive to do both, I'll just share a paired down version of my project.yml to give you ideas. In mine, I'm defining two sets of variables like a 2d matrix, but you should be able to get away with one.
|
Beta Was this translation helpful? Give feedback.
-
Hi!
I am trying to test an embedded library that I'm working on.
Some parts of the code are conditionally hidden with a
#ifdef DEFINE_NAME ... #else ... #endif
block, and I have a config header file (ex. lib_config.h) where the lib user can select (comment/uncomment #defines) which functionalities want to use.How can I use a different config header file for each test, so I can try all the different lib combinations?
Thank you! 😃
Beta Was this translation helpful? Give feedback.
All reactions