diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-05-04 20:42:00 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-05-04 20:42:00 +0300 |
commit | 17714a6c0217b62c56a1374563000c0ef008c571 (patch) | |
tree | 84de789e2402679dd4f66b48bb93c3df2f01376a /CMakeLists.txt | |
parent | 62985a1f7d25b84ce58f47dccdcd260d7d3041ae (diff) |
Fix race in section_handle singleton name generation on Windows.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 48f199a3..16d28155 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -185,6 +185,9 @@ include(CheckCXXSourceCompiles) include(CheckCXXSourceRuns) function(check_cxx_source_linkage prog var) set(CMAKE_REQUIRED_FLAGS ${check_cxx_source_linkage_flags}) + if(MSVC AND CMAKE_GENERATOR MATCHES "Ninja") + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} /EHsc") + endif() if(CMAKE_SYSTEM_PROCESSOR STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR}) check_cxx_source_runs("${prog}" ${var}) else() |