diff options
author | Brad King <brad.king@kitware.com> | 2016-04-07 14:54:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-07 14:54:43 (GMT) |
commit | e888af97197ab8b14012b6478d570f4e4fd84703 (patch) | |
tree | 87ec794b079af2050e8f047052bec1287f939f85 /Modules/Platform/Windows-MSVC.cmake | |
parent | 82c405c4737236ac0c954134d9cbc815823e2409 (diff) | |
download | CMake-e888af97197ab8b14012b6478d570f4e4fd84703.zip CMake-e888af97197ab8b14012b6478d570f4e4fd84703.tar.gz CMake-e888af97197ab8b14012b6478d570f4e4fd84703.tar.bz2 |
MSVC: Drop space in `/DNDEBUG` flag for consistency (#16052)
We define `NDEBUG` without a space after the `-D` option for most
compilers. Remove the space for MSVC (and Intel Fortran) for
consistency. The MS compiler technically does not document that
the `-D` argument may be separated from its value, though every
version to date supports it.
Diffstat (limited to 'Modules/Platform/Windows-MSVC.cmake')
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index deaa88e..1920a7c 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -303,15 +303,15 @@ macro(__windows_compiler_msvc lang) # that include MS's own headers. CMake itself is affected project too. set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} -fms-extensions -fms-compatibility -D_WINDOWS -Wall${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "-D_DEBUG /MDd -gline-tables-only -fno-inline -O0 ${_RTC1}") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD -O2 -D NDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -D NDEBUG") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -Os -D NDEBUG") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD -O2 -DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -DNDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -Os -DNDEBUG") else() set(CMAKE_${lang}_FLAGS_INIT "${_PLATFORM_DEFINES}${_PLATFORM_DEFINES_${lang}} /D_WINDOWS /W3${_FLAGS_${lang}}") set(CMAKE_${lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od ${_RTC1}") - set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") - set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + set(CMAKE_${lang}_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /DNDEBUG") + set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /DNDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /DNDEBUG") endif() set(CMAKE_${lang}_LINKER_SUPPORTS_PDB ON) set(CMAKE_NINJA_DEPTYPE_${lang} msvc) |