mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 14:20:06 -06:00
Since commit 6baf65ec46 (ASM: Do not consider MSVC C/CXX compiler for
generic ASM, 2025-04-08) we no longer mistake `cl` for an assembler.
However, some projects unconditionally enable ``ASM``, which worked
on Windows only due to that bug. Restore compatibility with such
projects by guarding the change behind a new policy ``CMP0194``.
Fixes: #26907
Issue: #26617
11 lines
351 B
CMake
11 lines
351 B
CMake
include(RunCMake)
|
|
|
|
# The test cases empty the PATH before enabling ASM to avoid finding
|
|
# another assembler in the caller's environment. However, old
|
|
# versions of MSVC do not support running `cl` without the PATH set.
|
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 16)
|
|
run_cmake(CMP0194-WARN)
|
|
run_cmake(CMP0194-OLD)
|
|
endif()
|
|
run_cmake(CMP0194-NEW)
|