Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress declared_but_not_referenced warning for NVHPC #2637

Merged
merged 1 commit into from
Feb 8, 2023

Commits on Feb 8, 2023

  1. Suppress declared_but_not_referenced warning for NVHPC

      Catch2 suppresses unused variable and equivalent warnings in a couple
      of places, but most importantly, in the declaration of autoRegistrar
      in test registry. This warning gets triggered by NVHPC compiler. The
      current patch adds three macros, namely:
    
          CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
          CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS
          CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
    
      for the NVHPC Compiler which in particular prevents that warning from
      occurring. The compiler is detected completely separately from the
      other compilers in this patch, because from what I found out, NVHPC
      defines __GNUC__ as well for some reason. (I suspect because it
      advertises itself as GNU compatible.)
    
      We also add a condition to make sure that the `__GNUC__` path is not
      taken by the NVHPC compiler.
    jbadwaik committed Feb 8, 2023
    Configuration menu
    Copy the full SHA
    644294d View commit details
    Browse the repository at this point in the history