-
Notifications
You must be signed in to change notification settings - Fork 1
/
compiler.hh
73 lines (59 loc) · 1.9 KB
/
compiler.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Copyright Stephan T. Lavavej, http://nuwen.net .
// Distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE_1_0.txt or copy at
// http://boost.org/LICENSE_1_0.txt .
#ifndef PHAM_COMPILER_HH
#define PHAM_COMPILER_HH
#ifdef __GNUC__
#define NUWEN_PLATFORM_GCC
#endif
#ifdef __MINGW32__
#define NUWEN_PLATFORM_MINGW
#endif
#ifdef _MSC_VER
#define NUWEN_PLATFORM_MSVC
#endif
#ifdef _WIN32
#define NUWEN_PLATFORM_WINDOWS
#else
#define NUWEN_PLATFORM_UNIX
#endif
#ifdef NUWEN_PLATFORM_MSVC
#pragma once
#endif
#define NUWEN_MAJOR_VERSION 2
#define NUWEN_MINOR_VERSION 0
#define NUWEN_GIZMO_VERSION 1
#define NUWEN_PATCH_VERSION 2
#define PHAM_STRINGIZE(PHAM_ARG) #PHAM_ARG
#define NUWEN_STRINGIZE(PHAM_ARG) PHAM_STRINGIZE(PHAM_ARG)
#define NUWEN_VERSION \
NUWEN_STRINGIZE(NUWEN_MAJOR_VERSION) "." \
NUWEN_STRINGIZE(NUWEN_MINOR_VERSION) "." \
NUWEN_STRINGIZE(NUWEN_GIZMO_VERSION) "." \
NUWEN_STRINGIZE(NUWEN_PATCH_VERSION)
#ifdef NUWEN_PLATFORM_GCC
#ifdef NUWEN_PLATFORM_MINGW
#define NUWEN_COMPILER_NAME "MinGW GCC"
#else
#define NUWEN_COMPILER_NAME "GCC"
#endif
#define NUWEN_COMPILER_VERSION \
NUWEN_STRINGIZE(__GNUC__) "." \
NUWEN_STRINGIZE(__GNUC_MINOR__) "." \
NUWEN_STRINGIZE(__GNUC_PATCHLEVEL__)
#elif defined NUWEN_PLATFORM_MSVC
#define NUWEN_COMPILER_NAME "Microsoft Visual Studio"
#if _MSC_VER == 1400
#define NUWEN_COMPILER_VERSION "2005 (8.0)"
#else
#define NUWEN_COMPILER_VERSION "(unknown version)"
#endif
#else
#define NUWEN_COMPILER_NAME "Unknown Compiler"
#define NUWEN_COMPILER_VERSION "(unknown version)"
#endif
#define NUWEN_COMPILER \
"This program was compiled on " __DATE__ " at " __TIME__ "\n" \
"by " NUWEN_COMPILER_NAME " " NUWEN_COMPILER_VERSION " using libnuwen " NUWEN_VERSION "."
#endif // Idempotency