Page 1 of 1

Use CXX to compile .c files

Posted: Thu May 23, 2019 4:49 pm
by apuder
Hi,
is it possible to make CXX the default compiler for .c files for a specific component? I'm looking/hoping for some component.mk magic that would allow me to do that.
TIA,
AP

Re: Use CXX to compile .c files

Posted: Fri May 24, 2019 4:10 am
by ESP_Sprite
I looked into it; there is no easy way. The most doable way would involve generating recipes to compile each and every .c file you waqnt treated in this way to an .o file manually. If you want to do this, the generalized recipe generators are in component_wrapper.mp, near 'define GenerateCompileTargets'. I'd say the easiest way to tackle this is to just rename your source files.