# CMake version 3.23 and 3.22 issue with IAR

**URL:** https://discourse.cmake.org/t/cmake-version-3-23-and-3-22-issue-with-iar/5228
**Category:** Development
**Tags:** os:windows, gen:ninja
**Created:** [March 16, 2022, 3:46pm UTC](https://discourse.cmake.org/t/cmake-version-3-23-and-3-22-issue-with-iar/5228 "2022-03-16T15:46:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Martial](https://discourse.cmake.org/user_avatar/discourse.cmake.org/martial/32/2260_2.png) [@Martial](https://discourse.cmake.org/u/Martial)
#### Post date: [March 16, 2022, 3:46pm UTC](https://discourse.cmake.org/t/cmake-version-3-23-and-3-22-issue-with-iar/5228/1 "2022-03-16T15:46:18Z")

</div>

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](https://github.com/Kitware/CMake/commit/a9073db736f6388f10f914c7361cc374f7522073).  
cf: [CMake/Modules/Compiler/IAR-CXX.cmake at 85a82a3dee0bf92eaa51f5b6e64a68840153438e · Kitware/CMake · GitHub](https://github.com/Kitware/CMake/blob/85a82a3dee0bf92eaa51f5b6e64a68840153438e/Modules/Compiler/IAR-CXX.cmake#L27).

More logs here:

 ![CMake_error_IAR_compiler](https://discourse.cmake.org/uploads/default/original/2X/0/0b09f1cd5044c9daf295eef92cfb3a3b51d2657b.png)

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

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [March 16, 2022, 8:12pm UTC](https://discourse.cmake.org/t/cmake-version-3-23-and-3-22-issue-with-iar/5228/2 "2022-03-16T20:12:51Z")

</div>

Please open an [issue](https://gitlab.kitware.com/cmake/cmake/-/issues) for this titled “IAR: Compilation fails with --eec++”.

---

<div class="post-metadata">

### Author: ![Martial](https://discourse.cmake.org/user_avatar/discourse.cmake.org/martial/32/2260_2.png) [@Martial](https://discourse.cmake.org/u/Martial)
#### Post date: [March 17, 2022, 7:43am UTC](https://discourse.cmake.org/t/cmake-version-3-23-and-3-22-issue-with-iar/5228/3 "2022-03-17T07:43:29Z")

</div>

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