diff options
| author | Jayesh Badwaik (FZ Juelich) | 2023-02-08 12:40:55 +0100 |
|---|---|---|
| committer | Jayesh Badwaik (FZ Juelich) | 2023-02-08 12:40:55 +0100 |
| commit | 644294df60b45cb9ac150cff8ffe49c119cdb349 (patch) | |
| tree | 354681317676725f973bf446b19c354cff46a4ec /src/catch2/interfaces | |
| parent | f3c0a3cd091aba8341a77e5c8580e5697f0e6892 (diff) | |
| download | catch3-644294df60b45cb9ac150cff8ffe49c119cdb349.tar.gz | |
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.
Diffstat (limited to 'src/catch2/interfaces')
0 files changed, 0 insertions, 0 deletions