Commit f293fe53 authored by Jan Möbius's avatar Jan Möbius
Browse files

Output correct version string for gcc

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8115 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 19090b39
...@@ -58,17 +58,8 @@ ...@@ -58,17 +58,8 @@
#include <QDir> #include <QDir>
#include <QCoreApplication> #include <QCoreApplication>
#if defined(__GNUC__) #define STRINGIFY(x) #x
#if defined(__GNUC_PATCHLEVEL__) #define TOSTRING(x) STRINGIFY(x)
#define __GNUC_VERSION__ ( __GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#else
#define __GNUC_VERSION__ ( __GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100)
#endif
#endif
namespace OpenFlipper { namespace OpenFlipper {
...@@ -811,7 +802,10 @@ bool renderPicking( ) { ...@@ -811,7 +802,10 @@ bool renderPicking( ) {
bool initializeSettings() { bool initializeSettings() {
#if defined(__GNUC__) #if defined(__GNUC__)
compilerInfo_ = "Gnu CC"; compilerInfo_ = "Gnu CC: " + QString( TOSTRING(__GNUC__) ) + "." + QString( TOSTRING(__GNUC_MINOR__) ) ;
#if defined(__GNUC_PATCHLEVEL__)
compilerInfo_ += "." + QString( TOSTRING(__GNUC_PATCHLEVEL__) );
#endif
#else #else
#if defined (_MSC_FULL_VER) #if defined (_MSC_FULL_VER)
compilerInfo_ = "MSVC"; compilerInfo_ = "MSVC";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment