From 9ec23c3443d2e64663ead137beb58d8107391220 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Wed, 5 Jul 2023 17:03:29 +0200 Subject: [PATCH] Enable /GUARD:CF during Windows compilation. --- windows/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index c0fd6ece..2fc55831 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -39,6 +39,8 @@ function(APPLY_STANDARD_SETTINGS TARGET) target_compile_features(${TARGET} PUBLIC cxx_std_17) target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_options(${TARGET} PRIVATE /GUARD:CF) + target_link_options(${TARGET} PRIVATE /GUARD:CF) target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") endfunction()