diff options
author | Brad King <brad.king@kitware.com> | 2016-06-17 14:04:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-06-17 14:18:47 (GMT) |
commit | 78249be29d0b9c187c5e459d636a8704ab3956eb (patch) | |
tree | 8f045b6b26e0e4e09e9269879cc4a36b9fe4944d /Modules | |
parent | 9d81f1b3aaa82d12a3a87067572b3ff5e2b9c4d2 (diff) | |
download | CMake-78249be29d0b9c187c5e459d636a8704ab3956eb.zip CMake-78249be29d0b9c187c5e459d636a8704ab3956eb.tar.gz CMake-78249be29d0b9c187c5e459d636a8704ab3956eb.tar.bz2 |
VS: Fix regressed mapping for the cl `/Os` compiler flag
In commit v3.6.0-rc1~279^2~10 (VS: in Clang/C2 toolset, setup correct
compiler settings, 2016-02-18) a flag mapping was added for the clang
`-Os` flag. However, this collides with a mapping we already had for
the MSVC flag of the same name. This is a symptom of a larger problem
in that the VS generators need a per-toolset flag map (issue #16153).
For now, simply drop the new mapping and drop `-Os` from clang compiler
flags in the MinSizeRel configuration.
Reported-by: Felix Bruns <felixbruns@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Windows-MSVC.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 1920a7c..6c254ed 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -305,7 +305,7 @@ macro(__windows_compiler_msvc 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 -DNDEBUG") set(CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT "/MD -gline-tables-only -O2 -fno-inline -DNDEBUG") - set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -Os -DNDEBUG") + set(CMAKE_${lang}_FLAGS_MINSIZEREL_INIT "/MD -DNDEBUG") # TODO: Add '-Os' once VS generator maps it properly for Clang 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}") |