Windows 32bit and ASM error when bumping cmake_minimum_required

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.

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

Cc: @brad.king

@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, 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. Which ASM toolchain are you using? What is the value of CMAKE_ASM_COMPILER_ID?

Sorry for the delay.
The CMAKE_ASM_COMPILER_ID is empty. As you can tell I’m somewhat alien to the WIN world :).

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