Skip to content

Commit

Permalink
Merge 9ad5037 into 3326937
Browse files Browse the repository at this point in the history
  • Loading branch information
srz-zumix committed Sep 6, 2020
2 parents 3326937 + 9ad5037 commit 30b007c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ stages:
- job: visual_studio_test
strategy:
matrix:
NO_EXCEPTION_HANDLER:
CMAKE_OPTIONS: -Dbuild_gtest_samples=ON -Dbuild_no_exceptions=ON
USE_EXPERIMENTAL:
CMAKE_OPTIONS: -Dbuild_gtest_samples=ON -Dbuild_use_experimental=ON
pool:
Expand Down
6 changes: 5 additions & 1 deletion include/internal/iutest_compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,11 @@
// c++
//! has exceptions
#if !defined(IUTEST_HAS_EXCEPTIONS)
# if defined(_MSC_VER) || defined(__BORLANDC__)
# if defined(_MSC_VER)
# if defined(_CPPUNWIND) && _CPPUNWIND
# define IUTEST_HAS_EXCEPTIONS 1
# endif
# elif defined(__BORLANDC__)
# ifndef _HAS_EXCEPTIONS
# define _HAS_EXCEPTIONS 1
# endif
Expand Down
8 changes: 6 additions & 2 deletions projects/cmake/internal_utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ macro(config_compiler_and_linker)
set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
set(cxx_no_exception_flags "-D_HAS_EXCEPTIONS=0")
set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0")
set(cxx_no_rtti_flags "-GR-")
elseif (CMAKE_COMPILER_IS_GNUCXX)
set(cxx_base_flags "-Wall -Wshadow")
Expand Down Expand Up @@ -96,7 +96,11 @@ macro(config_compiler_and_linker)
set(cxx_exception "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_exception_flags}")
set(cxx_no_exception
"${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_no_exception_flags}")
set(cxx_default "${cxx_exception}")
if (build_no_exceptions)
set(cxx_default "${cxx_no_exception}")
else()
set(cxx_default "${cxx_exception}")
endif()
set(cxx_no_rtti "${cxx_default} ${cxx_no_rtti_flags}")
set(cxx_use_own_tuple "${cxx_default}")

Expand Down

0 comments on commit 30b007c

Please sign in to comment.