1/*
2 Copyright (c) 2005-2019 Intel Corporation
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17// This file is intended for preloading (via compiler options such as -include) into every test.
18// Alas, not all compilers have such options, so the file is "optional".
19
20// Only add here things that are necessary for *every* test!
21// In particular, avoid including other headers.
22// Since this file can be omitted, checking compiler-specific conditions is strongly recommended.
23
24#ifndef harness_preload_H
25#define harness_preload_H
26
27#if __GNUC__>=5 && !__INTEL_COMPILER && !__clang__ && __GXX_EXPERIMENTAL_CXX0X__
28// GCC 5 has added -Wsuggest-override, but unfortunately enables it even in pre-C++11 mode.
29// We only want to use it for C++11 though.
30#pragma GCC diagnostic warning "-Wsuggest-override"
31#define __TBB_TEST_USE_WSUGGEST_OVERRIDE 1
32#endif
33// TODO: consider adding a similar option for clang
34
35#if __TBB_TEST_NO_EXCEPTIONS
36// This code breaks our own recommendations above, and it's deliberate:
37// it includes another file, but that file should only have macros and pragmas;
38// it does not check for compiler, as that is checked in the included file.
39// The file also defines TBB_USE_EXCEPTIONS=0, which is set for all tests via makefiles anyway.
40#include "tbb/tbb_disable_exceptions.h"
41#endif
42
43#endif /* harness_preload_H */
44