[Cmake-commits] CMake branch, next, updated. v3.7.0-1203-g977d4b3
Brad King
brad.king at kitware.com
Tue Nov 15 11:47:54 EST 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 977d4b3fbb9eb109496c33a8093103a5b45cad4a (commit)
via 6d0b5ff60d288c7847001c1cb01bd55c78cfe4e6 (commit)
from 027c414ab53ad6d204cff4473827652439b785a5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=977d4b3fbb9eb109496c33a8093103a5b45cad4a
commit 977d4b3fbb9eb109496c33a8093103a5b45cad4a
Merge: 027c414 6d0b5ff
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 15 11:47:53 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 15 11:47:53 2016 -0500
Merge topic 'msvc-no-explicit-_DEBUG' into next
6d0b5ff6 MSVC: Do not define _DEBUG explicitly when using /MDd
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6d0b5ff60d288c7847001c1cb01bd55c78cfe4e6
commit 6d0b5ff60d288c7847001c1cb01bd55c78cfe4e6
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 15 10:22:02 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 15 10:24:06 2016 -0500
MSVC: Do not define _DEBUG explicitly when using /MDd
With the latter flag the compiler automatically defines `_DEBUG`:
https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
Closes: #16430
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index d72ec66..f506500 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -285,13 +285,13 @@ macro(__windows_compiler_msvc lang)
# note: MSVC 14 2015 Update 1 sets -fno-ms-compatibility by default, but this does not allow one to compile many projects
# that include MS's own headers. CMake itself is affected project too.
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}")
- string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}")
+ string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}")
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD -O2 -DNDEBUG")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD -gline-tables-only -O2 -fno-inline -DNDEBUG")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang
else()
string(APPEND CMAKE_${lang}_FLAGS_INIT " ${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}")
- string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " /D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}")
+ string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " /MDd /Zi /Ob0 /Od ${_RTC1}")
string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " /MD /O2 /Ob2 /DNDEBUG")
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " /MD /Zi /O2 /Ob1 /DNDEBUG")
string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " /MD /O1 /Ob1 /DNDEBUG")
-----------------------------------------------------------------------
Summary of changes:
Modules/Platform/Windows-MSVC.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list