INTERFACE library target and CXX_MODULES file set

Hello,

I am completely confused with correct usage of C++ modules and INTERFACE targets. Let me please first describe what I currently have and what I want to achieve. I have a project consisting multiple firmwares for MCUs boards. Each firmware is written in C++26 and uses C++ modules. They also share common C++ source code which I want to logically separate and declare as a target.

However, the target can not be an OBJECT library since each MCU requires its own compilation flags (for instance, -mcpu). So, even being logically separate thing, the shared C++ source code must be recompiled each time for every firmware binary. There is INTERFACE target. But CXX_MODULES is not allowed for INTERFACE. So I am stuck here.