FreeRTOS configuration is complicated due to EXPAT specific files
To configure Non-CMake project, it is mandatory to explicitely list all required source folders. When using MCUXpresso (for FreeRTOS), this implies a long configuration in Eclipse configuration window to remove one by one every non-compiled files/folders. Typically, EXPAT is not present in FreeRTOS and then, some files will not compile under FreeRTOS, unless they are manually removed.
It is possible to avoid these steps by surrounding every EXPAT-dependant file by
#if !defined(SOPC_WITH_EXPAT) || SOPC_WITH_EXPAT
(...)
#endif //SOPC_WITH_EXPAT
And then just adding add_definitions (-DSOPC_WITH_EXPAT=1)
in CommonDefs.cmake when expat_FOUND
is true.
This has no impact when SOPC_WITH_EXPAT
is not defined
Edited by Jérémie Chabod