galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Pragma.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_PLATFORM_PRAGMA_HPP_
9#define GALAXY_PLATFORM_PRAGMA_HPP_
10
14#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined(_WIN64) || defined(_MSC_VER)
15#define GALAXY_WIN_PLATFORM
16#endif
17
21#if defined(__linux__) || defined(__unix) || defined(_POISX_VERSION) || defined(__GNUC__) || defined(__clang__)
22#define GALAXY_LINUX_PLATFORM
23#endif
24
28#if defined(__APPLE__) || defined(TARGET_OS_MAC)
29#define GALAXY_MACOS_PLATFORM
30#endif
31
32#ifdef GALAXY_WIN_PLATFORM
33#define GALAXY_PLATFORM_PUSH __pragma(warning(push))
34#define GALAXY_PLATFORM_POP __pragma(warning(pop))
35#define GALAXY_PLATFORM_WARNING(x) __pragma(warning(disable : x))
36#elif GALAXY_UNIX_PLATFORM
37#define GALAXY_PLATFORM_PUSH _Pragma("GCC diagnostic push")
38#define GALAXY_PLATFORM_POP _Pragma("GCC diagnostic pop")
39#define GALAXY_DO_PRAGMA(x) _Pragma(#x)
40#define GALAXY_PLATFORM_WARNING(x) GALAXY_DO_PRAGMA(GCC diagnostic ignored #x)
41#endif
42
43#define GALAXY_DISABLE_WARNING_PUSH GALAXY_PLATFORM_PUSH
44#define GALAXY_DISABLE_WARNING_POP GALAXY_PLATFORM_POP
45#define GALAXY_DISABLE_WARNING(x) GALAXY_PLATFORM_WARNING(x)
46
47#endif