diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2023-02-22 12:44:05 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2023-02-23 09:29:28 +0000 |
commit | 3d8b46685a5de6dfde3d37028eaf765522ea4f03 (patch) | |
tree | 9198ce33b9e18263fae5c8c0325f8d1169063d94 /cmake | |
parent | db80574b2577a610d5171d23a086dbce56d6bc1d (diff) | |
download | qt-creator-3d8b46685a5de6dfde3d37028eaf765522ea4f03.tar.gz |
MSVC: Enable exception handling for libs that use STL streams
Sample warning:
Building CXX object src\libs\qtcreatorcdbext\CMakeFiles\qtcreatorcdbext.dir\common.cpp.obj
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(342): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\ostream(335): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned long)'
F:\Projects\qt-creator\qt-creator\src\libs\qtcreatorcdbext\common.cpp(20): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(unsigned long)' being compiled
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\include\sstream(655): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
Change-Id: I26508048a875aabe4c5b80ef4cccfe091a2a145e
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Findyaml-cpp.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake index e6b65053bf..e7b3d361d3 100644 --- a/cmake/Findyaml-cpp.cmake +++ b/cmake/Findyaml-cpp.cmake @@ -124,7 +124,7 @@ else() set(yaml-cpp_FOUND 1) set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp") if(MSVC) - target_compile_options(yaml-cpp PUBLIC /wd4251 /wd4275) + target_compile_options(yaml-cpp PUBLIC /wd4251 /wd4275 /EHsc) endif() endif() unset(YAML_SOURCE_DIR) |