CMake version 3.23 and 3.22 issue with IAR

Hello,

From the last version of CMake (3.22 and 3.23), the build with the IAR compiler failed.
A strange argument in a new version of CMake which causes the failure of the build is: “–eec++”.

I have the following logs:

Command line error: Unexpected command line arguments:
–eec++

After some research, I discovered the implementation of this argument in CMake since this commit: IAR: update language specification detection · Kitware/CMake@a9073db · GitHub.
cf: CMake/IAR-CXX.cmake at 85a82a3dee0bf92eaa51f5b6e64a68840153438e · Kitware/CMake · GitHub.

More logs here:

I am reporting this problem as detected.
For the moment the solution I find is to use an older version of CMake (3.21).

Configuration :
Windows 10
Ninja
CMake 3.23.0
IAR 8.32
Mingw-w64-v9.0

Please open an issue for this titled “IAR: Compilation fails with --eec++”.

Thanks for the suggestion, the ticket was opened: https://gitlab.kitware.com/cmake/cmake/-/issues/23335