[x265] Disable exceptions and buffer security check for MSVC

Joshua Bowman JBowman at sunmaid.com
Mon Jun 2 23:29:05 CEST 2014


Disable exceptions (/EHsc) and buffer security check (/GS) for MSVC.

diff -r 5b6c9cda191b source/CMakeLists.txt
--- a/source/CMakeLists.txt	Mon Jun 02 14:21:04 2014 -0500
+++ b/source/CMakeLists.txt	Mon Jun 02 14:20:12 2014 -0700
@@ -93,6 +93,8 @@
     add_definitions(/W4)  # Full warnings
     add_definitions(/Ob2) # always inline
     add_definitions(/MP)  # multithreaded build
+    add_definitions(/GS-) # no buffer security check
+    string(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 
     # disable Microsofts suggestions for proprietary secure APIs
     add_definitions(/D_CRT_SECURE_NO_WARNINGS)


More information about the x265-devel mailing list