# Windows 32bit and ASM error when bumping cmake\_minimum\_required

**URL:** <https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066>\
**Category:** Code\
**Created:** [April 20, 2020, 9:18pm UTC](https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066 "2020-04-20T21:18:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eriols](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eriols/32/945_2.png) [@eriols](https://discourse.cmake.org/u/eriols)\
**Post date:** [April 20, 2020, 9:18pm UTC](https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066/1 "2020-04-20T21:18:40Z")

</div>

I had a CMakeLists with minimum required 3.3 and realised I should make that 3.15 as I used a feature from there under certain conditions.  
I was surprised to see that this broke a Windows 32 bit build (not using the 3.15 feature by the way) with this message:  
“MSVC\_RUNTIME\_LIBRARY value ‘MultiThreaded’ not known for this ASM compiler.”  
If I for Windows and 32 bit builds enable ASM\_MASM instead of plain ASM it works.

How come this happened and only for 32 bit (worked on 64)?  
It might be worth noting I’m not setting the CMAKE\_MSVC\_RUNTIME\_LIBRARY, instead have an old regex replace of /MD to /MT.

Just curious as this seems strange to a noob.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [November 9, 2020, 9:10pm UTC](https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066/2 "2020-11-09T21:10:53Z")

</div>

I suspect we never added the runtime library types for ASM compilers.

Cc: @brad.king

---

<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:** [November 10, 2020, 12:26pm UTC](https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066/3 "2020-11-10T12:26:30Z")

</div>

@eriols by updating the minimum required version you’re enabling newer policies and telling CMake that your project has been updated for them. In this case that includes policy [CMP0091](https://cmake.org/cmake/help/latest/policy/CMP0091.html), which changes the way MSVC runtime library selection flags are added. The new approach is much easier to use than regex/string replacement of `/M*` flags. However, it does require CMake to know what flags to use with every compiler for each kind of MSVC runtime library. The original change added those settings for most compilers, but ASM was overlooked.

Runtime library settings were added for `ASM_MASM` by [CMake MR 4257](https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4257). Which ASM toolchain are you using? What is the value of `CMAKE_ASM_COMPILER_ID`?

---

<div class="post-metadata">

**Author:** ![eriols](https://discourse.cmake.org/user_avatar/discourse.cmake.org/eriols/32/945_2.png) [@eriols](https://discourse.cmake.org/u/eriols)\
**Post date:** [November 12, 2020, 2:44pm UTC](https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066/4 "2020-11-12T14:44:05Z")

</div>

Sorry for the delay.  
The CMAKE\_ASM\_COMPILER\_ID is empty. As you can tell I’m somewhat alien to the WIN world :).

---

<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:** [November 13, 2020, 1:00pm UTC](https://discourse.cmake.org/t/windows-32bit-and-asm-error-when-bumping-cmake-minimum-required/1066/5 "2020-11-13T13:00:59Z")

</div>

Strange. What is CMake’s terminal output w.r.t the ASM compiler?
