From c07eb52f30f502048ad6b0bcf12b5f4f86c82d37 Mon Sep 17 00:00:00 2001 From: Sebastian Held Date: Tue, 4 May 2010 09:31:10 +0200 Subject: [PATCH] openEMS presents its build version --- main.cpp | 6 ++++++ openEMS.pro | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 970e249..23f9d9b 100644 --- a/main.cpp +++ b/main.cpp @@ -25,6 +25,10 @@ #define STANDALONE +#ifndef GIT_VERSION +#define GIT_VERSION "unknown:compiled@" __DATE__ +#endif + using namespace std; int main(int argc, char *argv[]) @@ -34,6 +38,8 @@ int main(int argc, char *argv[]) #ifdef STANDALONE if (argc<=1) { + cout << " | openEMS version " GIT_VERSION << endl; + cout << " | (C) 2010 Thorsten Liebig GPL license" << endl << endl; cout << " usage: openEMS FDTD_XML_FILE [--disable-dumps] [--debug-material] [--debug-operator]" << endl; exit(-1); } diff --git a/openEMS.pro b/openEMS.pro index 9c38386..66da7b3 100644 --- a/openEMS.pro +++ b/openEMS.pro @@ -76,12 +76,15 @@ HEADERS += tools/ErrorMsg.h \ FDTD/engine_ext_mur_abc.h \ FDTD/operator_ext_mur_abc.h \ FDTD/excitation.h -QMAKE_CXXFLAGS_RELEASE = -O2 \ +QMAKE_CXXFLAGS_RELEASE = -O3 \ -g \ - -march=native -msse -msse2 + -march=native QMAKE_CXXFLAGS_DEBUG = -O0 \ -g \ - -march=native -msse -msse2 + -march=native + +# add git revision +QMAKE_CXXFLAGS += -DGIT_VERSION=\\\"`git describe --tags`\\\" # to use ABI2 target: # qmake CONFIG+="ABI2 bits64" -o Makefile.ABI2-64 openEMS.pro