Skip to content

Build SmartPeak2 (and OpenMS)

Pasquale Colaianni edited this page Jul 13, 2019 · 5 revisions

Windows

https://github.com/dmccloskey/SmartPeak2/issues/157

Linux

Starting from Ubuntu 18.04, it's not necessary to manually build OpenMS' contrib. The packages available in the repositories are recent enough.

Note: It is assumed that code resides in ~/OpenMS and ~/SmartPeak2.

Building OpenMS

cd ~
mkdir OpenMS-build
cd OpenMS-build
cmake -DBOOST_USE_STATIC=OFF -DHAS_XSERVER=OFF -DWITH_GUI=OFF -DENABLE_TUTORIALS=OFF -DENABLE_DOCS=OFF -DGIT_TRACKING=OFF -DENABLE_UPDATE_CHECK=OFF -DCMAKE_BUILD_TYPE=Debug -DPYOPENMS=OFF -DOPENMS_COVERAGE=OFF ~/OpenMS
make -j4 OpenMS

Building SmartPeak

SuperBuild helps downloading the dependencies for SmartPeak. Feel free to comment out any dependency that you don't want to (super)build by modifying the file CMakeLists.txt.

Example:

if (USE_SUPERBUILD)
  project ("SuperBuild" NONE)
  include(external/plog.cmake)
  if (MSVC)
    # include(external/eigen.cmake)
    include(external/boost.cmake)
    # include(external/openms.cmake)
  endif()
  return()
else()
  project ("SmartPeak_host")
endif()

Then proceed with:

cd ~
mkdir SmartPeak2_superbuild SmartPeak2_build
cd SmartPeak2_superbuild
cmake -DUSE_SUPERBUILD=ON -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ~/SmartPeak2
make -j4
cd ~/SmartPeak2_build
cmake -DEIGEN_USE_GPU=OFF -DUSE_SUPERBUILD=OFF -DBOOST_USE_STATIC=OFF -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=$HOME/OpenMS-build/ -DPLOG_INCLUDE_DIR=$HOME/SmartPeak2_superbuild/Dependencies/Source/plog/include -DIMGUI_DIR=$HOME/SmartPeak2_superbuild/Dependencies/Source/imgui -DImGui_INCLUDE_DIR=$HOME/SmartPeak2_superbuild/Dependencies/Source/imgui -DCMAKE_BUILD_TYPE=Debug ~/SmartPeak2
make -j4

Some dependencies one might have to install:

sudo apt install qt5-default libboost-dev libeigen3-dev libxerces-c-dev coinor-libcbc-dev libsvm-dev libboost-iostreams-dev libboost-date-time-dev libboost-math-dev libwildmagic-dev libsqlite3-dev libglpk-dev seqan-dev libhdf5-dev
Clone this wiki locally