From 0613a35bc1b6a3eab8fcf3b24f860f0771190c10 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 22 Sep 2024 09:24:59 +0300 Subject: [PATCH] winpty: Fix MSVC warnings vector(1133): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc vector(1133): note: the template instantiation context (the oldest one first) is winpty\src\shared\Buffer.cc(42): note: see reference to function template instantiation 'std::_Vector_iterator>> std::vector>::insert(std::_Vector_const_iterator>>,_Iter,_Iter)' being compiled with [ _Elem=char, _Iter=const char * ] winpty\src\shared\Buffer.cc(42): note: see the first reference to 'std::vector>::insert' in 'WriteBuffer::putRawData' vector(1237): note: see reference to function template instantiation 'void std::vector>::_Insert_counted_range<_Iter>(std::_Vector_const_iterator>>,_Iter,const unsigned __int64)' being compiled with [ _Iter=const char *, _Elem=char ] Change-Id: I69575be8e8533754a41dfdc3091248d08471a2d8 Reviewed-by: David Schulz Reviewed-by: Marcus Tillmanns --- src/libs/3rdparty/winpty/src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/3rdparty/winpty/src/CMakeLists.txt b/src/libs/3rdparty/winpty/src/CMakeLists.txt index 22b15111d4f..33828ba2e85 100644 --- a/src/libs/3rdparty/winpty/src/CMakeLists.txt +++ b/src/libs/3rdparty/winpty/src/CMakeLists.txt @@ -107,5 +107,9 @@ add_qtc_library(winpty STATIC ${shared_sources} ) +if(MSVC) + target_compile_options(winpty PUBLIC /EHsc) +endif() + target_include_directories(winpty PUBLIC $)