mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 03:39:43 -06:00
Apply the change from commit db35e3cfd6 (VS: Fix support for '/guard:cf'
linker flag for v142, 2019-01-24, v3.14.0-rc1~74^2~2) to the v143 flag
table.
The entry for `LinkControlFlowGuard` in `v143_Link.json` does not work
when used in a `.vcxproj` file. Drop our link flag table entries for
this toolset so that the flag will be passed via `AdditionalOptions`.
Also add a test case.
8 lines
218 B
CMake
8 lines
218 B
CMake
enable_language(CXX)
|
|
|
|
# Add the Control Flow Guard compiler and linker option
|
|
add_compile_options("/guard:cf")
|
|
string(APPEND CMAKE_SHARED_LINKER_FLAGS " /guard:cf")
|
|
|
|
add_library(ControlFlowGuardProject SHARED foo.cpp)
|