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)

if(BUILD_HAS_MOD_TRANSPORT_FC) target_compile_definitions(${SCP_MODULE_TARGET} PRIVATE "BUILD_HAS_MOD_TRANSPORT_FC") endif()

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 girish.pathak@arm.com Tested-by: Thomas Abraham thomas.abraham@arm.com Signed-off-by: Nicola Mazzucato nicola.mazzucato@arm.com

Merge request reports