diff options
author | Brad King <brad.king@kitware.com> | 2022-06-10 14:39:42 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-10 14:40:06 (GMT) |
commit | 99a0f1b1b26283a6de308c604ddc9436f900ca36 (patch) | |
tree | c305be8cfdc73b93b6998f0e8036dc7d482fdc11 /Help | |
parent | 5ed9232d781ccfa3a9fae709e12999c6649aca2f (diff) | |
parent | 7d73e88d3a7490cf1047369da8292a57c0b60bce (diff) | |
download | CMake-99a0f1b1b26283a6de308c604ddc9436f900ca36.zip CMake-99a0f1b1b26283a6de308c604ddc9436f900ca36.tar.gz CMake-99a0f1b1b26283a6de308c604ddc9436f900ca36.tar.bz2 |
Merge topic 'revert-msvc-compilers-default-to-ZI'
7d73e88d3a MSVC: Revert "Default to -ZI instead of /Zi for x86 and x64"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7344
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 2 | ||||
-rw-r--r-- | Help/policy/CMP0138.rst | 32 | ||||
-rw-r--r-- | Help/release/3.24.rst | 3 |
3 files changed, 2 insertions, 35 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 1447c17..d99afe3 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -59,7 +59,7 @@ Policies Introduced by CMake 3.24 :maxdepth: 1 CMP0139: The if() command supports path comparisons using PATH_EQUAL operator. </policy/CMP0139> - CMP0138: MSVC compilers use -ZI instead of /Zi for x86 and x64 by default. </policy/CMP0138> + CMP0138: Placeholder for reverted policy. </policy/CMP0138> CMP0137: try_compile() passes platform variables in project mode. </policy/CMP0137> CMP0136: Watcom runtime library flags are selected by an abstraction. </policy/CMP0136> CMP0135: ExternalProject ignores timestamps in archives by default for the URL download method. </policy/CMP0135> diff --git a/Help/policy/CMP0138.rst b/Help/policy/CMP0138.rst index 5cf3948..c7f0e2d 100644 --- a/Help/policy/CMP0138.rst +++ b/Help/policy/CMP0138.rst @@ -3,37 +3,7 @@ CMP0138 .. versionadded:: 3.24 -MSVC compilers use ``-ZI`` instead of ``/Zi`` for x86 and x64 by default. - -When using MSVC C/C++ compilers in CMake 3.23 and below, debug information -format flag ``/Zi`` is added to :variable:`CMAKE_<LANG>_FLAGS_DEBUG` and -:variable:`CMAKE_<LANG>_FLAGS_RELWITHDEBINFO` by default. The ``/Zi`` flag -produces a separate PDB file that contains all the symbolic debugging -information for use with the debugger, however, it does not support Edit -and Continue feature in a debugging session. - -CMake 3.24 and above adds ``-ZI`` to :variable:`CMAKE_<LANG>_FLAGS_DEBUG` -and :variable:`CMAKE_<LANG>_FLAGS_RELWITHDEBINFO` instead to enable Edit -and Continue by default. - -This policy provides compatibility with projects that have not been updated -to expect the lack of warning flags. The policy setting takes effect as of -the first :command:`project` or :command:`enable_language` command that -initializes :variable:`CMAKE_<LANG>_FLAGS_DEBUG` and -:variable:`CMAKE_<LANG>_FLAGS_RELWITHDEBINFO` for a given language -``<LANG>`` using MSVC compilers. - -.. note:: - - Once the policy has taken effect at the top of a project for a given - language, that choice must be used throughout the tree for that language. - In projects that have nested projects in subdirectories, be sure to - convert everything together. - -The ``OLD`` behavior for this policy is to place ``/Zi`` in the default -:variable:`CMAKE_<LANG>_FLAGS_DEBUG` and -:variable:`CMAKE_<LANG>_FLAGS_RELWITHDEBINFO` cache entries. The ``NEW`` -behavior for this policy is to place ``-ZI`` in the default cache entries. +Placeholder for reverted policy. This policy was introduced in CMake version 3.24. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. diff --git a/Help/release/3.24.rst b/Help/release/3.24.rst index 05fd848..f347acb 100644 --- a/Help/release/3.24.rst +++ b/Help/release/3.24.rst @@ -319,9 +319,6 @@ Deprecated and Removed Features Other Changes ============= -* With MSVC compilers, debug configurations now use ``-ZI`` by default - instead of ``/Zi``. See policy :policy:`CMP0138`. - * CMake no longer sets environment variables like :envvar:`CC`, :envvar:`CXX`, etc. when enabling the corresponding language during the first CMake run in a build directory. See policy :policy:`CMP0132`. |