Skip to content

Commit

Permalink
Enable additional security checks for MSVC
Browse files Browse the repository at this point in the history
The /sdl compiler option enables additional security checks that were
previously not enabled.
  • Loading branch information
charles-lunarg committed Oct 10, 2023
1 parent 520eaa5 commit 27c13e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clan
# /guard:cf: Enable control flow guard
# /wd4152: Disable warning on conversion of a function pointer to a data pointer
# /wd4201: Disable warning on anonymous struct/unions
target_compile_options(loader_common_options INTERFACE /GR- /guard:cf /wd4152 /wd4201)
target_compile_options(loader_common_options INTERFACE /sdl /GR- /guard:cf /wd4152 /wd4201)

# Enable control flow guard
target_link_options(loader_common_options INTERFACE "LINKER:/guard:cf")
Expand Down

0 comments on commit 27c13e7

Please sign in to comment.