Commit a9b31c51 by Kirill Bobyrev Committed by Dominic Hamon

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.
parent c6193afe
...@@ -103,6 +103,7 @@ if (MSVC) ...@@ -103,6 +103,7 @@ if (MSVC)
if (NOT BENCHMARK_ENABLE_EXCEPTIONS) if (NOT BENCHMARK_ENABLE_EXCEPTIONS)
add_cxx_compiler_flag(-EHs-) add_cxx_compiler_flag(-EHs-)
add_cxx_compiler_flag(-EHa-) add_cxx_compiler_flag(-EHa-)
add_definitions(-D_HAS_EXCEPTIONS=0)
endif() endif()
# Link time optimisation # Link time optimisation
if (BENCHMARK_ENABLE_LTO) if (BENCHMARK_ENABLE_LTO)
...@@ -167,7 +168,7 @@ else() ...@@ -167,7 +168,7 @@ else()
endif() endif()
# ICC17u2: overloaded virtual function "benchmark::Fixture::SetUp" is only partially overridden # ICC17u2: overloaded virtual function "benchmark::Fixture::SetUp" is only partially overridden
# (because of deprecated overload) # (because of deprecated overload)
add_cxx_compiler_flag(-wd654) add_cxx_compiler_flag(-wd654)
add_cxx_compiler_flag(-Wthread-safety) add_cxx_compiler_flag(-Wthread-safety)
if (HAVE_CXX_FLAG_WTHREAD_SAFETY) if (HAVE_CXX_FLAG_WTHREAD_SAFETY)
cxx_feature_check(THREAD_SAFETY_ATTRIBUTES) cxx_feature_check(THREAD_SAFETY_ATTRIBUTES)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment