소스 검색

Enable control flow guard (#4457)

Helena Kotas 3 년 전
부모
커밋
d3c7fac3c4
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      CMakeLists.txt

+ 7 - 0
CMakeLists.txt

@@ -105,6 +105,13 @@ endif()
 if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND WIN32)
   add_link_options(/DEBUGTYPE:CV,FIXUP,PDATA /INCREMENTAL:NO)
 endif()
+
+# enable control flow guard
+if(WIN32)
+add_compile_options(/guard:cf)
+add_link_options(/guard:cf)
+endif(WIN32)
+
 # HLSL Change Ends
 
 # HLSL Change Starts - set flag for Appveyor CI