File: CMP0194.rst

package info (click to toggle)
cmake 4.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 152,344 kB
  • sloc: ansic: 403,894; cpp: 303,807; sh: 4,097; python: 3,582; yacc: 3,106; lex: 1,279; f90: 538; asm: 471; lisp: 375; cs: 270; java: 266; fortran: 239; objc: 215; perl: 213; xml: 198; makefile: 108; javascript: 83; pascal: 63; tcl: 55; php: 25; ruby: 22
file content (27 lines) | stat: -rw-r--r-- 1,068 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CMP0194
-------

.. versionadded:: 4.1

MSVC is not an assembler for language ASM.

When enabling the ``ASM`` language, CMake considers C compiler drivers
as assembler candidates.  CMake 4.0 and below accidentally selected
MSVC's ``cl`` compiler as the ``CMAKE_ASM_COMPILER``, allowing the ``ASM``
language to be enabled on Windows even though ``cl`` does not support
assembler sources.  CMake 4.1 and above prefer to reject ``cl`` as an
assembler candidate, but some existing projects unconditionally enable
``ASM`` on Windows even though they add no assembler sources.  This
policy provides compatibility for such projects to allow them to
configure as before.

The ``OLD`` behavior for this policy is to successfully enable ``ASM``
even if ``cl`` is the only available candidate.  The ``NEW`` behavior
for this policy is to not consider ``cl`` as a candidate assembler
for the ``ASM`` language.

.. |INTRODUCED_IN_CMAKE_VERSION| replace:: 4.1
.. |WARNS_OR_DOES_NOT_WARN| replace:: warns
.. include:: include/STANDARD_ADVICE.rst

.. include:: include/DEPRECATED.rst