Unit Testing - linker error with add_unit_gtest()

I get a weird linker error, whenever a unit test covers code that contains PX4_INFO / ERROR / WARNING statements or makes use of the timing functionality.
As an example: I add a PX4_INFO("foo"); and the corresponding #include <px4_log.h> somewhere in the Attitude Control and then try to make tests TESTFILTER=Attitude results in a linker error, but make px4_fmu-v5_default compiles just fine.