From ad3b08280d693fbdb72e925600945e015fa7b578 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 3 Apr 2017 13:41:20 -0400 Subject: [PATCH] Add /EHs for targets for MSVC --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 214ff91..0cb338a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,6 +114,12 @@ function(spvtools_default_compile_options TARGET) endif() endif() + if (MSVC) + # Specify /EHs for exception handling. This makes using SPIRV-Tools as + # dependencies in other projects easier. + target_compile_options(${TARGET} PRIVATE /EHs) + endif() + # For MinGW cross compile, statically link to the C++ runtime. # But it still depends on MSVCRT.dll. if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") -- 2.7.4