ThrowTheSwitch / Ceedling

Ruby-based unit testing and build system for C projects

Home Page:http://throwtheswitch.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I provide "-include " options to the gcc

stemschmidt opened this issue · comments

I am using Ceedling only for unit testing, mocking and coverage report generation, not for building the project.

The project is build with tools which utilize Kconfig. In order to provide the configured defines to Ceedling I am using the "-include" option of gcc to feed the autoconf.h file to all sources.

I noticed that all options added to the :defines: section in the project.yml are prepended with a '-D' before given to gcc, so I am not able to use this section for my purpose.

Is there a way to provide the "-include" somehow to gcc? (I have copied the standard definitions like "test_file_preprocessor" to my project.yml and added the option there, but I am sure there is a more elegant way to do it.

ok, finally found someone mentioning the flags section. This solves my issue:

🎏
:test:
:compile:
:*:
- -include ../application/build/generated/autoconf.h