]> Dogcows Code - chaz/yoink/blob - src/stlplus/portability/build.cpp
cleanup stlplus files
[chaz/yoink] / src / stlplus / portability / build.cpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "build.hpp"
10 #include "version.hpp"
11 #include "dprintf.hpp"
12 ////////////////////////////////////////////////////////////////////////////////
13
14 namespace stlplus
15 {
16
17 ////////////////////////////////////////////////////////////////////////////////
18 // report the platform-specific details of this build
19
20 std::string build(void)
21 {
22 ////////////////////////////////////////////////////////////////////////////////
23 // work out the platform
24
25 #ifdef _WIN32
26 std::string platform("Windows");
27 #else
28 // at present there are no variations between different Unix platforms so
29 // they all map onto the generic Unix platform
30 std::string platform("Generic Unix");
31 #endif
32
33 ////////////////////////////////////////////////////////////////////////////////
34 // work out the compiler
35
36 #if defined __GNUC__
37 std::string compiler(dformat("gcc v%s",__VERSION__));
38 #elif defined _MSC_VER
39 std::string compiler(dformat("MSVC v%0.2f",((float)_MSC_VER)/100.0));
40 #elif defined __BORLANDC__
41 std::string compiler(dformat("Borland v%d.%d",__BORLANDC__/256,__BORLANDC__/16%16));
42 #else
43 std::string compiler("unknown compiler");
44 #endif
45
46 ////////////////////////////////////////////////////////////////////////////////
47 // work out the kind of build
48 // there are two variants - debug and release
49
50 #ifndef NDEBUG
51 std::string variant("debug");
52 #else
53 std::string variant("release");
54 #endif
55
56 return std::string("STLplus v") + version() + ", " + platform + ", " + compiler + ", " + variant;
57 }
58
59 ////////////////////////////////////////////////////////////////////////////////
60 } // end namespace stlplus
This page took 0.033241 seconds and 4 git commands to generate.