Skip to content

Commit

Permalink
Workaround NVHPC and MSVC error
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed Jan 10, 2025
1 parent 7eaf5c2 commit bdbbada
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions c2h/include/c2h/catch2_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ _CCCL_NV_DIAG_SUPPRESS(177) // catch2 may contain unused variables
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/matchers/catch_matchers_vector.hpp>

// workaround for error #3185-D: no '#pragma diagnostic push' was found to match this 'diagnostic pop'
#if _CCCL_COMPILER(NVHPC) || _CCCL_COMPILER(MSVC)
# undef CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
# undef CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma("diag push")
# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma("diag pop")
#endif

#ifndef VAR_IDX
# define VAR_IDX 0
#endif
Expand Down

0 comments on commit bdbbada

Please sign in to comment.