Define that ESP-IDF framework need to be compilled as C

Hello!

Try to make my first ESP-IDF firmware.
When i make C code all seems to be good - firmware complied and i get it.

So, than i tried to make Firmware on CPP language.
To achieve that i renamed main.c to main.cpp and try to rebuild project.
And get strange FreeRTOS error - ‘/.platformio/packages/framework-espidf/components/freertos/include/freertos/task.h:386:237: error: invalid conversion from
’void ()()’ to 'TaskFunction_t {aka void ()(void*)}’ [-fpermissive]’

As i see, i need to define that espidf framework needed to be compilled as C and my code compilled as C++.
How can i achieve that? Tried to play with GCC flags but it seems to be ok.

I will be great full for any help.