Difficulties with CMake generated project with STM32CubeMX
Hello,
I'm working on a CMake F030 based project, generated with STM32CubeMX (MX and firmware package up to date to last version)
So the CMakeList.txt link to a stm32cubemx library. Generating the basic project is ok.
But now, I have created a libPWM that is in its own directory, with it own CMakeList.txt. It add some compilation_option such as -Wconversion and -Werror
The pwmLib has to be linked to the stm32cubemx (for Driver include, cpu information...)
But as the stm32cubemx is an interface, when generating the libPWM, it rebuild the stm32cubemx (for example Libs/libPWM/CMakeFiles/libPWM.dir/__/__/Drivers/STM32F0xx_HAL_Dreiver/Src/stm32f0xx_hal_flash_ex.c.obj) The problem is that it use the compile options that were defined in libPWM (-WConversion -WError). And the compilation failed because there are conversion warning in Drivers.
How to avoid the stm32cubemx to be recompiled when linking to it, or how to avoid my compilation option to be propagate to the stm32cubemx lib when recompiled
Thank you
Antoine
