Skip to content

Commit a9b31c5

Browse files
kirillbobyrevdominichamon
authored andcommitted
Disable exceptions in Microsoft STL (#715)
This is the copy of patch proposed to LLVM's copy of benchmark via https://reviews.llvm.org/D52998.
1 parent c6193af commit a9b31c5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ if (MSVC)
103103
if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
104104
add_cxx_compiler_flag(-EHs-)
105105
add_cxx_compiler_flag(-EHa-)
106+
add_definitions(-D_HAS_EXCEPTIONS=0)
106107
endif()
107108
# Link time optimisation
108109
if (BENCHMARK_ENABLE_LTO)
@@ -167,7 +168,7 @@ else()
167168
endif()
168169
# ICC17u2: overloaded virtual function "benchmark::Fixture::SetUp" is only partially overridden
169170
# (because of deprecated overload)
170-
add_cxx_compiler_flag(-wd654)
171+
add_cxx_compiler_flag(-wd654)
171172
add_cxx_compiler_flag(-Wthread-safety)
172173
if (HAVE_CXX_FLAG_WTHREAD_SAFETY)
173174
cxx_feature_check(THREAD_SAFETY_ATTRIBUTES)

0 commit comments

Comments
 (0)