Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Help / prop_tgt / MSVC_DEBUG_INFORMATION_FORMAT.rst
1 MSVC_DEBUG_INFORMATION_FORMAT
2 -----------------------------
3
4 .. versionadded:: 3.25
5
6 Select debug information format when targeting the MSVC ABI.
7
8 The allowed values are:
9
10 .. include:: MSVC_DEBUG_INFORMATION_FORMAT-VALUES.txt
11
12 Use :manual:`generator expressions <cmake-generator-expressions(7)>` to
13 support per-configuration specification.  For example, the code:
14
15 .. code-block:: cmake
16
17   add_executable(foo foo.c)
18   set_property(TARGET foo PROPERTY
19     MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>")
20
21 selects for the target ``foo`` the program database debug information format
22 for the Debug configuration.
23
24 If this property is not set, CMake selects a debug information format using
25 the default value ``$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>``, if
26 supported by the compiler, and otherwise
27 ``$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>``.
28
29 .. note::
30
31   This property has effect only when policy :policy:`CMP0141` is set to ``NEW``
32   prior to the first :command:`project` or :command:`enable_language` command
33   that enables a language using a compiler targeting the MSVC ABI.