Generator epressions not available when cross-compiling
I would like to use the generator expressions, such as LINK_LIBRARY
and LINK_GROUP
for my embedded project, but I get the following error:
Feature 'WHOLE_ARCHIVE', specified through generator-expression
'$<LINK_LIBRARY>' to link target 'my_project', is not supported for
the 'CXX' link language.
I am cross-compiling my project using a GCC compiler, so there is no issues with the compiler support.
I think the issue is caused by setting the CMAKE_SYSTEM_NAME
to Generic in the toolchain file:
set(CMAKE_SYSTEM_NAME Generic)
Would it be possible to add support of these features for Generic systems?
My CMake version is 3.26.4.