Mantid
Loading...
Searching...
No Matches
System.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2007 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
9/*******************************************************************************
10 * READ THIS!! (AND THEN READ IT AGAIN)
11 *
12 *
13 * PLEASE DON'T EDIT THIS FILE UNLESS ADDING SOMETHING THAT ABSOLUTELY
14 * MUST BE SEEN BY **EVERY** FILE IN MANTID
15 *
16 *
17 *******************************************************************************/
18
19/* A system-wide file to contain, e.g., useful system-dependent macros
20
21 @author Russell Taylor, Tessella Support Services plc
22 @date 26/10/2007
23*/
24
28#ifdef _WIN32
29// 'identifier' : class 'type' needs to have dll-interface to be used by clients
30// of class 'type2'
31// Things from the std library give these warnings and we can't do anything
32// about them.
33#pragma warning(disable : 4251)
34// Given that we are compiling everything with msvc under Windows and
35// linking all with the same runtime we can disable the warning about
36// inheriting from a non-exported interface, e.g. std::runtime_error */
37#pragma warning(disable : 4275)
38// Warning C4373: previous versions of the compiler did not override when
39// parameters only differed by const/volatile qualifiers
40// This is basically saying that it now follows the C++ standard and doesn't
41// seem useful
42#pragma warning(disable : 4373)
43
44// Export/Import declarations
45#define DLLExport __declspec(dllexport)
46#define DLLImport __declspec(dllimport)
47#define EXTERN_IMPORT extern
48#elif defined(__GNUC__) && !defined(__clang__)
49#define DLLExport __attribute__((visibility("default")))
50#define DLLImport
51#define EXTERN_IMPORT extern
52#else
53#define DLLExport
54#define DLLImport
55#define EXTERN_IMPORT
56#endif
57
63#ifndef UNUSED_ARG
64#define UNUSED_ARG(x) (void)x;
65#endif
66
70#if (defined(__GNUC__) || defined(__clang__))
71#define DEPRECATED(func) func __attribute__((deprecated))
72#elif defined(_MSC_VER)
73#define DEPRECATED(func) __declspec(deprecated) func
74#else
75#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
76#define DEPRECATED(func) func
77#endif
78
82#include <cstddef>
83#include <cstdint>