PixarAnimationStudios / OpenUSD

Universal Scene Description

Home Page:http://www.openusd.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do you silence TBB warnings during compiling?

ColinKennedy opened this issue · comments

While working with USD, for as long as I can remember back to USD 19.11, there are warnings when including USD headers. I'd like to ideally have "warnings as errors" -Werror enabled but warnings like these would false positive and prevent builds. I'd like to completely silence them, how can I do that?

.../USD-v24.03-python-3.10.12/include/tbb/task.h|21 col 139| note: ‘#pragma message: TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.’
||    21 | #pragma message("TBB Warning: tbb/task.h is deprecated. For details, please see Deprecated Features appendix in the TBB reference manual.")

I tried...

  1. Using preprocessor pragmas to quiet the warning
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include <pxr/usd/sdf/layer.h>
#pragma GCC diagnostic pop
  1. Defining #define message(ignore) so calls to #pragma message will do nothing instead

Neither approach as worked so far.

Secondarily if the code can be updated to not have these warnings, that'd be also great (hence this GitHub issue to track it).

Filed as internal issue #USD-9546