add ROOT version information for better diagnostics.

This commit is contained in:
suter_a 2021-04-09 09:33:08 +02:00
parent 7089e4b3d6
commit 38b289b99f
15 changed files with 101 additions and 45 deletions

View File

@ -5,7 +5,7 @@ if (CMAKE_VERSION GREATER_EQUAL 3.12)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)
endif (CMAKE_VERSION GREATER_EQUAL 3.12) endif (CMAKE_VERSION GREATER_EQUAL 3.12)
project(musrfit VERSION 1.7.0 LANGUAGES C CXX) project(musrfit VERSION 1.7.1 LANGUAGES C CXX)
#--- musrfit specific options ------------------------------------------------- #--- musrfit specific options -------------------------------------------------
option(nexus "build optional NeXus support. Needed for ISIS" OFF) option(nexus "build optional NeXus support. Needed for ISIS" OFF)

View File

@ -1,6 +1,7 @@
// config.h // config.h
#define PACKAGE_VERSION "@PROJECT_VERSION@" #define PACKAGE_VERSION "@PROJECT_VERSION@"
#define ROOT_VERSION_USED "@ROOT_VERSION@"
// define to 1 if you have <alloca.h> and it should be used // define to 1 if you have <alloca.h> and it should be used
#cmakedefine HAVE_ALLOCA_H 1 #cmakedefine HAVE_ALLOCA_H 1

View File

@ -197,7 +197,7 @@ int main(int argc, char *argv[])
any2many_syntax(); any2many_syntax();
else if (strstr(argv[1], "--v")) { else if (strstr(argv[1], "--v")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "any2many version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "any2many git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "any2many git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif

View File

@ -776,7 +776,7 @@ int main(int argc, char *argv[])
return 0; return 0;
} else if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-v")) { } else if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-v")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "dump_header version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "dump_header version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "dump_header git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "dump_header git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif

View File

@ -512,7 +512,7 @@ int main(int argc, char *argv[])
return 0; return 0;
} else if (!strcmp(argv[1], "--version")) { } else if (!strcmp(argv[1], "--version")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "msr2data version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "msr2data version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "msr2data git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "msr2data git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif

View File

@ -297,7 +297,7 @@ Int_t musrFT_parse_options(Int_t argc, Char_t *argv[], musrFT_startup_param &sta
tstr = argv[i]; tstr = argv[i];
if (tstr.BeginsWith("--version")) { if (tstr.BeginsWith("--version")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "musrFT version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrFT version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "musrFT git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrFT git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif

View File

@ -1,9 +1,5 @@
#--- musredit for Qt > 5.0 ---------------------------------------------------- #--- musredit for Qt > 5.0 ----------------------------------------------------
#--- check if Qt5WebEngine or Qt5WebKit is present ----------------------------
#find_package(Qt5WebEngine QUIET)
#find_package(Qt5WebKit QUIET)
set(qt_libs Qt5::Core Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Svg Qt5::PrintSupport) set(qt_libs Qt5::Core Qt5::Widgets Qt5::Network Qt5::Xml Qt5::Svg Qt5::PrintSupport)
set(musredit_src set(musredit_src
@ -110,35 +106,13 @@ else (APPLE)
) )
endif (APPLE) endif (APPLE)
# set necessary tags depending if QtWebEngine, QtWebKit,
# or none of both are given
if (Qt5WebKit_FOUND)
target_compile_options(musredit
BEFORE PRIVATE
-DHAVE_QT_WEB_KIT
)
endif (Qt5WebKit_FOUND)
if (Qt5WebEngine_FOUND)
target_compile_options(musredit
BEFORE PRIVATE
-DHAVE_QT_WEB_ENGINE
)
endif (Qt5WebEngine_FOUND)
if (Qt5NoWeb)
target_compile_options(musredit
BEFORE PRIVATE
-DHAVE_QT_NO_WEB
)
endif (Qt5NoWeb)
target_include_directories(musredit target_include_directories(musredit
BEFORE PRIVATE BEFORE PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../../..>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
) )

View File

@ -27,6 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/ ***************************************************************************/
#include "config.h"
#include "git-revision.h" #include "git-revision.h"
#include "PMusrEditAbout.h" #include "PMusrEditAbout.h"
@ -40,6 +41,8 @@ PMusrEditAbout::PMusrEditAbout(QWidget *parent) : QDialog(parent)
fGitBranch_label->setText(QString("git-branch: %1").arg(GIT_BRANCH)); fGitBranch_label->setText(QString("git-branch: %1").arg(GIT_BRANCH));
fGitRev_label->setText(QString("git-rev: %1").arg(GIT_CURRENT_SHA1)); fGitRev_label->setText(QString("git-rev: %1").arg(GIT_CURRENT_SHA1));
fMusrfitVersion_label->setText(QString("musrfit-version: %1").arg(PACKAGE_VERSION));
fRootVersion_label->setText(QString("ROOT-version: %1").arg(ROOT_VERSION_USED));
setModal(true); setModal(true);
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>395</width> <width>395</width>
<height>225</height> <height>331</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,13 +17,13 @@
<iconset> <iconset>
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset> <normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>13</x> <x>14</x>
<y>13</y> <y>14</y>
<width>371</width> <width>371</width>
<height>201</height> <height>311</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -44,6 +44,26 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:24pt; font-weight:400; font-style:italic;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:24pt; font-weight:400; font-style:italic;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;musredit ...&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;musredit ...&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fMusrfitVersion_label">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>musrfit-version:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -80,6 +100,23 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="fRootVersion_label">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>ROOT-version:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="fDetails_label"> <widget class="QLabel" name="fDetails_label">
<property name="text"> <property name="text">

View File

@ -111,6 +111,7 @@ target_include_directories(musredit
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/..>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..> $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../../..>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
) )

View File

@ -27,6 +27,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/ ***************************************************************************/
#include "config.h"
#include "git-revision.h" #include "git-revision.h"
#include "PMusrEditAbout.h" #include "PMusrEditAbout.h"
@ -40,6 +41,8 @@ PMusrEditAbout::PMusrEditAbout(QWidget *parent) : QDialog(parent)
fGitBranch_label->setText(QString("git-branch: %1").arg(GIT_BRANCH)); fGitBranch_label->setText(QString("git-branch: %1").arg(GIT_BRANCH));
fGitRev_label->setText(QString("git-rev: %1").arg(GIT_CURRENT_SHA1)); fGitRev_label->setText(QString("git-rev: %1").arg(GIT_CURRENT_SHA1));
fMusrfitVersion_label->setText(QString("musrfit-version: %1").arg(PACKAGE_VERSION));
fRootVersion_label->setText(QString("ROOT-version: %1").arg(ROOT_VERSION_USED));
setModal(true); setModal(true);
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>395</width> <width>395</width>
<height>225</height> <height>331</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,13 +17,13 @@
<iconset> <iconset>
<normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset> <normaloff>:/images/musrfit.xpm</normaloff>:/images/musrfit.xpm</iconset>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>13</x> <x>14</x>
<y>13</y> <y>14</y>
<width>371</width> <width>371</width>
<height>201</height> <height>311</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@ -44,6 +44,26 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:24pt; font-weight:400; font-style:italic;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:24pt; font-weight:400; font-style:italic;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;musredit ...&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;musredit ...&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="fMusrfitVersion_label">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>musrfit-version:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -80,6 +100,23 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="fRootVersion_label">
<property name="font">
<font>
<weight>75</weight>
<italic>true</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>ROOT-version:</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item> <item>
<widget class="QLabel" name="fDetails_label"> <widget class="QLabel" name="fDetails_label">
<property name="text"> <property name="text">

View File

@ -464,7 +464,7 @@ int main(int argc, char *argv[])
if (argc == 2) { if (argc == 2) {
if (!strcmp(argv[1], "--version")) { if (!strcmp(argv[1], "--version")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "musrfit version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrfit version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "musrfit git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrfit git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif

View File

@ -237,7 +237,7 @@ Int_t main(Int_t argc, Char_t *argv[])
for (int i=1; i<argc; i++) { for (int i=1; i<argc; i++) {
if (!strcmp(argv[i], "--version")) { if (!strcmp(argv[i], "--version")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "musrt0 version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrt0 version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "musrt0 git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrt0 git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif

View File

@ -135,7 +135,7 @@ int main(int argc, char *argv[])
} }
} else if (!strcmp(argv[i], "--version")) { } else if (!strcmp(argv[i], "--version")) {
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
std::cout << std::endl << "musrview version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrview version: " << PACKAGE_VERSION << ", git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << ", ROOT version: " << ROOT_VERSION_USED << std::endl << std::endl;
#else #else
std::cout << std::endl << "musrview git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl; std::cout << std::endl << "musrview git-branch: " << GIT_BRANCH << ", git-rev: " << GIT_CURRENT_SHA1 << std::endl << std::endl;
#endif #endif