summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/version.h
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-18 16:09:51 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-18 16:09:51 -0700
commitdee470bf63c25c3d99ea89e9d9f5979ab01d53bb (patch)
tree0b8a3a91c89e0ad6713e62702dfc23bf875ec9b7 /crawl-ref/source/version.h
parentb3475474824eb75feb901ed9fa3b5826626a185b (diff)
downloadcrawl-ref-dee470bf63c25c3d99ea89e9d9f5979ab01d53bb.tar.gz
crawl-ref-dee470bf63c25c3d99ea89e9d9f5979ab01d53bb.zip
Add compilation information to Version namespace
The Version namespace now provides the compiler which was used, the OS, machine type and processor type the compilation was done on, and the CFLAGS, CFLAGS_L and LDFLAGS which were used. If GCC was the compiler, it also provides the compiler version. This information is included in crash reports, and can be dumped using the new command line option "-version".
Diffstat (limited to 'crawl-ref/source/version.h')
-rw-r--r--crawl-ref/source/version.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/crawl-ref/source/version.h b/crawl-ref/source/version.h
index 8b8341b2a3..660b38ff92 100644
--- a/crawl-ref/source/version.h
+++ b/crawl-ref/source/version.h
@@ -85,6 +85,53 @@ namespace Version
* will return the alpha/beta/rc number. Otherwise, this returns 0.
*/
int ReleaseID();
+
+ //! The compiler used.
+ /*!
+ * Names the compiler used to genrate the executable.
+ */
+ std::string Compiler();
+
+ //! The operating system.
+ /*!
+ * Names the operating system that the executable was compiled on.
+ */
+ std::string BuildOS();
+
+ //! The machine type.
+ /*!
+ * Names the machine type (e.g., "i686") the executable was compiled on.
+ */
+ std::string BuildMachine();
+
+ //! The processor type.
+ /*!
+ * Names the processor type the executable was compiled on.
+ */
+ std::string BuildProcessor();
+
+ //! The CFLAGS.
+ /*!
+ * Returns the CFLAGS the executable was compiled with.
+ */
+ std::string CFLAGS();
+
+ //! The CFLAGS_L.
+ /*!
+ * Returns the CFLAGS_L the executable was compiled with.
+ */
+ std::string CFLAGS_L();
+
+ //! The LDFLAGS.
+ /*!
+ * Returns the flags the executable was linked with.
+ */
+ std::string LDFLAGS();
}
+/* ***********************************************************************
+ * called from: initfile debug
+ * *********************************************************************** */
+std::string compilation_info();
+
#endif