mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
The mapping for this flag was added by commit43aa632f57(VS: Populate `-Qspectre-` flag table entry for v142, 2019-01-24, v3.14.0-rc1~74^2~7). However, it did not do anything because the special logic added by commitbb60ed6e72(VS: Add flag table entry for -Qspectre, 2018-10-08, v3.13.0-rc1~4^2) to move the `SpectreMitigation` element from `ClCompile` to the top level only handled the presence of the setting and not its value. Extend the special logic to carry the value too. Fixes: #19535
9 lines
275 B
CMake
9 lines
275 B
CMake
set(CMAKE_CONFIGURATION_TYPES Debug)
|
|
enable_language(C)
|
|
|
|
add_library(SpectreMitigationOn-C empty.c)
|
|
target_compile_options(SpectreMitigationOn-C PRIVATE -Qspectre)
|
|
|
|
add_library(SpectreMitigationOff-C empty.c)
|
|
target_compile_options(SpectreMitigationOff-C PRIVATE -Qspectre-)
|