Skip to content

Commit

Permalink
AUTO UIC fixes and linux install docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cbielow committed Jul 5, 2024
1 parent 36c9768 commit 5a4304f
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 16 deletions.
38 changes: 25 additions & 13 deletions doc/doxygen/install/install-linux.doxygen
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<ul>
<li>
Essential are \b gcc/g++ (>= 7.0) or similar ANSI C++ compiler with full C++17 support,
\b CMake (>= 3.24), \b Qt5 (>= 5.6), \b patch, \b autoconf (> 2.60), \b automake (> 1.9), \b libtool (libtoolize/glibtoolize).
\b CMake (>= 3.24), \b Qt 6 (>= 6.2), \b patch, \b autoconf (> 2.60), \b automake (> 1.9), \b libtool (libtoolize/glibtoolize).
</li>
<li>
For the complete feature set to be enabled, %OpenMS needs recent versions of
Expand Down Expand Up @@ -82,7 +82,7 @@
# Update repo list for the thirdparty repository EPEL
sudo yum repolist
# Get REQUIRED installable contrib libraries
sudo yum install cmake3 qt5-qtbase-gui qt5-qtbase-devel qt5-qtsvg-devel python-devel
sudo yum install cmake3 qt6-qtbase-gui qt6-qtbase-devel qt6-qtsvg-devel python-devel
# Get OPTIONAL installable contrib libraries preferably from our Contrib package in the next step.
## sudo yum boost-devel libsvm-devel libzip-devel zlib-devel xerces-c-devel bzip2-devel libhdf5-devel glpk-devel
# NOTE that you might need to use cmake3 instead of cmake in the commands of the following steps.
Expand All @@ -96,7 +96,7 @@
# tools
sudo zypper install cmake gcc-c++ autoconf git patch automake libtool
# REQUIRED dependencies
sudo zypper install libqt5-qtbase-devel libqt5-qtsvg-devel python-devel glpk-devel
sudo zypper install libqt6-qtbase-devel libqt6-qtsvg-devel python-devel glpk-devel
# OPTIONAL dependencies, preferably installed with our Contrib package in the next step
## sudo zypper install boost-devel libzip-devel zlib-devel \
# libxerces-c-devel libbz2-devel libsvm-devel libhdf5-10
Expand All @@ -109,7 +109,7 @@
sudo add-apt-repository universe
sudo apt update
sudo apt-get install build-essential cmake autoconf patch libtool git automake
sudo apt-get install qtbase5-dev libqt5svg5-dev libqt5opengl5-dev
sudo apt-get install qtbase6-dev libqt6svg6-dev libqt6opengl6-dev
sudo apt-get install libeigen3-dev libboost-random-dev libboost-regex-dev \
libboost-iostreams-dev libboost-date-time-dev libboost-math-dev libxerces-c-dev \
zlib1g-dev libsvm-dev libbz2-dev coinor-libcoinmp-dev libhdf5-dev
Expand Down Expand Up @@ -180,13 +180,23 @@
\endcode

Alternatively, you can build one package after the other by providing
<tt>-DBUILD_TYPE=...</tt> with the appropriate argument. In addition, you
may have to compile Qt yourself which you can get from <a
<tt>-DBUILD_TYPE=...</tt> with the appropriate argument.


In addition, you may have to compile Qt yourself which you can get from <a
href="http://download.qt.io/official_releases/qt">http://download.qt.io/official_releases/qt</a>
(use version >5.5), if it is not provided on your server or the version on
(use version >6.2), if it is not provided on your server or the version on
your environment is too old. Then you can use the traditional
<tt>./configure --prefix=/path && make && make install</tt> sequence to compile
and install Qt (note that you should set the <tt>--prefix=/path</tt> to a local directory assuming

@code
tar xvf qt-everywhere-src-6.5.3.tar.xz
cd qt-everywhere-src-6.5.3
./configure --prefix=. -skip qtdoc -skip qttranslations -skip qttools
cmake --build . --parallel
cmake --install .

@endcode
to compile and install Qt (note that you should set the <tt>--prefix=/path</tt> to a local directory assuming
you don't have root privileges).


Expand Down Expand Up @@ -223,11 +233,11 @@
\endcode
to the CMake options.

If CMake has problems finding Qt5 (Qt5SvgConfig.cmake is usually the first to fail), you might consider adding:
If CMake has problems finding Qt6, you might consider adding:
\code
-DQt5_DIR=/PATH/TO/qt/5.9.7/gcc_64/lib/cmake/Qt5
-D Qt6_DIR=/PATH/TO/qt/lib/cmake/Qt6/
\endcode
to the CMake options, where <tt>/PATH/TO/qt/5.9.7/gcc_64</tt> depends on your system settings and Qt version.
to the CMake options, where <tt>/PATH/TO/qt/lib/cmake/Qt6/</tt> depends on your system settings and Qt version.

When configuring %OpenMS, consider setting <tt>WITH_GUI=Off</tt> and
<tt>HAS_XSERVER=Off</tt>, especially as you may not have compiled Qt with
Expand All @@ -244,17 +254,19 @@
This works only after having executed <tt>cmake</tt> once (see @ref install_linux_openms)

In order to <i>build</i> the %OpenMS library, the TOPP tools, tests, and this
documentation, execute the following command:
documentation, execute the following command (for Makefile generator, which is the default in CMake):

\code
make
\endcode


Advanced users can list the separate make targets by calling:
\code
make targets
\endcode

@note If you use another generator, such as Ninja (`cmake -G Ninja ...`), then swap `make` for the new command, such as `ninja`.

@subsection linux_openms_environment Getting your environment ready to use OpenMS

Expand Down
1 change: 1 addition & 0 deletions src/openms/include/OpenMS/MATH/MathFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <boost/random/uniform_int.hpp>
#include <cmath>
#include <utility> // for std::pair
#include <vector>

namespace OpenMS
{
Expand Down
13 changes: 13 additions & 0 deletions src/openms_gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ if (MSVC)
set_property(TARGET OpenMS_GUI APPEND PROPERTY LINK_FLAGS ${GUI_lnk_flags}) ## allow multiple definitions of symbols (e.g. from template instanciations or STL-derived classes)
endif()


# --------------------------------------------------------------------------
# some targets using OpenMS_GUI (e.g. in the GUI tests) need the ui_..h files, so add them to OpenMS_GUI's interface.
get_property(_isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_isMultiConfig)
set(AUTOGEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/OpenMS_GUI_autogen/include_$<CONFIG>)
else()
set(AUTOGEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/OpenMS_GUI_autogen/include)
endif()
# add include-directories for UIC'd files (CMake does not do that automatically)
target_include_directories(OpenMS_GUI INTERFACE $<BUILD_INTERFACE:${AUTOGEN_INCLUDE_DIR}>)


#------------------------------------------------------------------------------
# register relevant paths for the doxygen doc generation
openms_doc_path("${PROJECT_SOURCE_DIR}/include")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void OpenMS::TestTSGDialog::testIonsIntensities_()
QRect rect = UI->ion_types->visualItemRect(item);

// imitate the click on check box c
QTest::mouseClick(UI->ion_types->viewport(), Qt::LeftButton, 0, rect.center());
QTest::mouseClick(UI->ion_types->viewport(), Qt::LeftButton, Qt::NoModifier, rect.center());
QTest::qWait(DELAY);

// verfiy the check state changed
Expand Down Expand Up @@ -432,4 +432,4 @@ QTEST_MAIN(TestTSGDialog)
// QWidget* activeWidget = dropDownList->viewport();
// QTest::mouseClick(activeWidget, Qt::LeftButton, Qt::NoModifier, foundDropDownItemPosition);
// QTest::qWait(DELAY);
//}
//}
2 changes: 1 addition & 1 deletion src/topp/DatabaseFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class TOPPDatabaseFilter :

OPENMS_LOG_INFO << "Number of Protein IDs: " << id_accessions.size() << endl;

for (const auto entry : db)
for (const auto& entry : db)
{
const String& fasta_accession = entry.identifier;
const bool found = id_accessions.find(fasta_accession) != id_accessions.end();
Expand Down

0 comments on commit 5a4304f

Please sign in to comment.