Skip to content

How do you silence TBB warnings during compiling? #3035

@ColinKennedy

Description

@ColinKennedy

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions