cmake/Tests/RunCMake/VS10Project/VsControlFlowGuardLinkSetting.cmake

8 lines
218 B
CMake
Raw Normal View History

2022-03-29 21:10:50 +02:00
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)