overte/libraries/shared/src/TBBHelpers.h
Dale Glass 7d08df3f82 Fix build on Fedora.
Fix portfile license handling.
Fix tbb choking on Qt's 'emit' macro.
2023-05-16 18:56:33 +02:00

45 lines
1 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Created by Bradley Austin Davis on 2017/06/06
// Copyright 2013-2017 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#pragma once
#ifndef hifi_TBBHelpers_h
#define hifi_TBBHelpers_h
#ifdef _WIN32
#pragma warning( push )
#pragma warning( disable : 4334 )
#endif
#if !defined(Q_MOC_RUN)
// Work around https://bugreports.qt.io/browse/QTBUG-80990
// This causes a compile error in profiling.h:
// profiling.h:229:15: error: expected unqualified-id before ) token
// 229 | void emit() { }
//
// 'emit' is defined to nothing in qt and is just syntactic sugar, so get rid of it
#undef emit
#include <tbb/concurrent_queue.h>
#include <tbb/concurrent_unordered_map.h>
#include <tbb/concurrent_unordered_set.h>
#include <tbb/concurrent_vector.h>
#include <tbb/parallel_for.h>
#include <tbb/blocked_range2d.h>
// and re-add later.
#define emit
#endif
#ifdef _WIN32
#pragma warning( pop )
#endif
#endif // hifi_TBBHelpers_h