Skip to content

Commit

Permalink
Fix macro-redefinition issue with MSVC+CUDA
Browse files Browse the repository at this point in the history
Closes #2603
  • Loading branch information
horenmar committed Jan 14, 2023
1 parent d59572f commit 52870ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/catch2/internal/catch_compiler_capabilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,14 @@
// Visual C++
#if defined(_MSC_VER)

# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) )
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) )
// We want to defer to nvcc-specific warning suppression if we are compiled
// with nvcc masquerading for MSVC.
# if !defined( __CUDACC__ )
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
__pragma( warning( push ) )
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
__pragma( warning( pop ) )
# endif

// Universal Windows platform does not support SEH
// Or console colours (or console at all...)
Expand Down

0 comments on commit 52870ff

Please sign in to comment.