For example, i may have a target like:
Code: Select all
foo:
CFLAGS='-DFOO=1' $(MAKE) all
bar:
CFLAGS='-DBAR=1' $(MAKE) all
tests:
CFLAGS='-DUNIT_TESTING' $(MAKE) TEST_COMPONENTS='my_component' flash monitor
Code: Select all
make tests
Is there a way I can do this in CMake+Ninja+idf_ext.py ? I know i can create custom targets via CMake, and I can set some define_cache_entry via idf_ext.py, but I just can't seem to put it all together. Thanks!
tl;dr I enabled additional helper code via the flag UNIT_TESTING which also enabled the unity driver; compiling all this code was done via a make target, trying to accomplish the same thing with CMake+Ninja.