Skip to content

module/fch_polled: fix build error when included interface only module

Nicola Mazzucato requested to merge nm_fch_poll_fix into main

For most modules that are common across some platforms, its path is added in module/CMakeLists.txt, however, this also means it can be treated as an interface-only module provided any dependent module links the respective module using target_link_library call. Although this works fine for most of the modules, occasionally a build error can be seen if such a module also tries to set a build flag for its compilation in its CMakeLists.txt. Since in build where such module is not built, cmake prohibits setting compilation flag if the module is included as interface only module.

A build error is generated for the code in fch_polled/CMakeLists.txt(below)


A simple fix would be to define above flag only if the module is compiled/built for the firmware. This change provides this fix.

Change-Id: I52ca777fbcb3fa7aea04908bda35fc03ae459a5e Signed-off-by: Girish Pathak Tested-by: Thomas Abraham Signed-off-by: Nicola Mazzucato

Merge request reports