From CMake 3.25 onwards when using the Intel C++ Compiler linking flags need to be wrapped with LINKER: or /Qoption,link because CMake uses the compiler driver for linking.
If the options are not wrapped they are ignore by icx with a warning.
Reproducer
To make the error more obvious I enabled warnings as errors for the linking stage:
Description
From CMake 3.25 onwards when using the Intel C++ Compiler linking flags need to be wrapped with
LINKER:
or/Qoption,link
because CMake uses the compiler driver for linking.If the options are not wrapped they are ignore by icx with a warning.
Reproducer
To make the error more obvious I enabled warnings as errors for the linking stage:
Results in the following error: