Subversion Repositories public iLand

Rev

Rev 1221 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1183 werner 1
/********************************************************************************************
2
**    iLand - an individual based forest landscape and disturbance model
3
**    http://iland.boku.ac.at
4
**    Copyright (C) 2009-  Werner Rammer, Rupert Seidl
5
**
6
**    This program is free software: you can redistribute it and/or modify
7
**    it under the terms of the GNU General Public License as published by
8
**    the Free Software Foundation, either version 3 of the License, or
9
**    (at your option) any later version.
10
**
11
**    This program is distributed in the hope that it will be useful,
12
**    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
**    GNU General Public License for more details.
15
**
16
**    You should have received a copy of the GNU General Public License
17
**    along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
********************************************************************************************/
19
 
20
 
21
#include <QString>
1213 werner 22
static const char *version = "1.0";
1219 werner 23
static const char *svn_revision = "1220";
1183 werner 24
const char *currentVersion(){ return version;}
25
const char *svnRevision(){ return svn_revision;}
26
 
27
// compiler version
28
#ifdef Q_CC_MSVC
29
#define MYCC "MSVC"
30
#endif
31
#ifdef Q_CC_GNU
32
#define MYCC "GCC"
33
#endif
34
#ifdef Q_CC_INTEL
35
#define MYCC "Intel"
36
#endif
37
#ifndef MYCC
38
#define MYCC "unknown"
39
#endif
40
 
41
// http://stackoverflow.com/questions/1505582/determining-32-vs-64-bit-in-c
42
// Check windows
43
#if _WIN32 || _WIN64
44
#if _WIN64
45
#define ENVIRONMENT64
46
#else
47
#define ENVIRONMENT32
48
#endif
49
#endif
50
 
51
// Check GCC
52
#if __GNUC__
53
#if __x86_64__ || __ppc64__
54
#define ENVIRONMENT64
55
#else
56
#define ENVIRONMENT32
57
#endif
58
#endif
59
 
60
#ifdef ENVIRONMENT32
61
#define BITS "32 bit"
62
#else
63
#define BITS "64 bit"
64
#endif
65
 
66
 
67
QString compiler()
68
{
69
    return QString("%1 %2 Qt %3").arg(MYCC).arg(BITS).arg(qVersion());
70
}
71
 
72
QString verboseVersion()
73
{
74
    const char *bd = __DATE__; // build date
75
    QString s = QString("%1 (svn: %2, %3, %4)").arg(currentVersion()).arg(svnRevision()).arg(bd).arg(qVersion());
76
    return s;
77
}