Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add win32/compiler/select_compiler_features.h to detect compiler features.
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 29 Sep 2006 08:38:13 +0000 (08:38 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 29 Sep 2006 08:38:13 +0000 (08:38 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2842 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/win32/compiler/select_compiler_features.h [new file with mode: 0644]

diff --git a/src/win32/compiler/select_compiler_features.h b/src/win32/compiler/select_compiler_features.h
new file mode 100644 (file)
index 0000000..e1d770c
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef __XBT_SELECT_COMPILER_FEATURES_H__
+#define __XBT_SELECT_COMPILER_FEATURES_H__
+
+
+/* select_compiler_features.h - compiler features selection    */
+
+/* Copyright (c) 2003, 2004 Cherier Malek. All rights reserved.            */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#define _XBT_COMPILER_RESOLVED         0
+
+
+/* Borland compilers */
+#if defined (__BORLANDC__)
+#define _XBT_COMPILER_NAME     "Borland C/C++"
+        #define _XBT_COMPILER_VENDOR    "Inprise Corporation"
+#define _XBT_BORLAND_COMPILER  2
+/* version macro : __BORLANDC__ */
+/* version format : ?           */
+#define _XBT_COMPILER_VERSION          __BORLANDC__
+#define _XBT_COMPILER_VERSION_FORMAT   "?"
+
+        #undef _XBT_COMPILER_RESOLVED
+        #define _XBT_COMPILER_RESOLVED 1
+#endif
+
+/* GGG compilers */
+
+#if defined(__GNUC__)
+#if defined(__GNUC_PATCHLEVEL__)
+#define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#else
+#define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
+#endif
+
+#define _XBT_COMPILER_NAME     "GCC"
+        #define _XBT_COMPILER_VENDOR    "GNU"
+#define _XBT_GCC_COMPILER      2
+/* version macro : __GNUC_VERSION__ */
+/* version format : VVRRPP (VV = Version, RR = Revision, PP = Patch) */
+#define _XBT_COMPILER_VERSION          __GNUC_VERSION__
+#define _XBT_COMPILER_VERSION_FORMAT   "VVRRPP (VV = Version, RR = Revision, PP = Patch)"
+
+        #undef _XBT_COMPILER_RESOLVED
+        #define _XBT_COMPILER_RESOLVED 1
+#endif
+
+
+
+
+/* Returns the compiler name. */
+#define _xbt_get_compiler_name()               _XBT_COMPILER_NAME
+
+/* Returns the compiler vendor. */
+#define _xbt_get_compiler_vendor()             _XBT_COMPILER_VENDOR
+
+/* Returns 1 if the compiler is resolved (0 in the other case). */
+#define _xbt_is_compiler_resolved()            _XBT_COMPILER_RESOLVED
+
+/* Returns the compiler version. */
+#define _xbt_get_compiler_version()             _XBT_STRINGIZE(_XBT_COMPILER_VERSION)
+
+/* Returns the compiler version format. */
+#define _xbt_get_compiler_version_format()     _XBT_COMPILER_VERSION_FORMAT
+
+
+
+#endif /* #ifndef __XBT_SELECT_FEATURES_COMPILER_H__ */
\ No newline at end of file