From 2e38008558bc77e97bc97758df61d6244ea658a3 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Wed, 28 Jan 2015 05:07:25 -0800 Subject: [PATCH] Define _HAS_EXCEPTIONS=0 to avoid MSVC C4530 warning. Avoid "warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc" when compiling MSVC's by disabling the exception code in MSVC's STL using _HAS_EXCEPTIONS=0. Change-Id: I75aeb445d58cc9fb44467a6044386ae6b519cca8 Reviewed-on: https://boringssl-review.googlesource.com/3111 Reviewed-by: Adam Langley --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d2c39fff..643f351d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ elseif(MSVC) # Disable warnings for implicit integer narrowing. set(CMAKE_C_FLAGS "/wd4267") set(CMAKE_CXX_FLAGS "/wd4267") + add_definitions(-D_HAS_EXCEPTIONS=0) endif() if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.5.99") OR