diff options
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() |