CMP0194.rst 1.0 KB

123456789101112131415161718192021222324252627
  1. CMP0194
  2. -------
  3. .. versionadded:: 4.1
  4. MSVC is not an assembler for language ASM.
  5. When enabling the ``ASM`` language, CMake considers C compiler drivers
  6. as assembler candidates. CMake 4.0 and below accidentally selected
  7. MSVC's ``cl`` compiler as the ``CMAKE_ASM_COMPILER``, allowing the ``ASM``
  8. language to be enabled on Windows even though ``cl`` does not support
  9. assembler sources. CMake 4.1 and above prefer to reject ``cl`` as an
  10. assembler candidate, but some existing projects unconditionally enable
  11. ``ASM`` on Windows even though they add no assembler sources. This
  12. policy provides compatibility for such projects to allow them to
  13. configure as before.
  14. The ``OLD`` behavior for this policy is to successfully enable ``ASM``
  15. even if ``cl`` is the only available candidate. The ``NEW`` behavior
  16. for this policy is to not consider ``cl`` as a candidate assembler
  17. for the ``ASM`` language.
  18. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.1
  19. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  20. .. include:: include/STANDARD_ADVICE.rst
  21. .. include:: include/DEPRECATED.rst