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_val<std::_Simple_types<_Elem>>> std::vector<char,std::allocator<char>>::insert<const char*,0>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Elem>>>,_Iter,_Iter)' being compiled
        with
        [
            _Elem=char,
            _Iter=const char *
        ]
winpty\src\shared\Buffer.cc(42): note: see the first reference to 'std::vector<char,std::allocator<char>>::insert' in 'WriteBuffer::putRawData'
vector(1237): note: see reference to function template instantiation 'void std::vector<char,std::allocator<char>>::_Insert_counted_range<_Iter>(std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<_Elem>>>,_Iter,const unsigned __int64)' being compiled
        with
        [
            _Iter=const char *,
            _Elem=char
        ]

Change-Id: I69575be8e8533754a41dfdc3091248d08471a2d8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Orgad Shaneh
2024-09-22 09:24:59 +03:00
committed by Orgad Shaneh
parent b62baf436c
commit 0613a35bc1

View File

@@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)