BioShell is written in C++11 and must be built before use. This is a quite easy process, which requires CMake (https://cmake.org) and a relatively modern C++ compiler such as gcc 5.0 or clang 10.0 The compilation procedure is as follows:
BioShell requires zlib library so it can handle compressed files. You must install developer version of the library to be able to compile BioShell. On Ubuntu linux it can be installed by the command:
sudo apt-get install zlib1g-dev
1. If you haven’t done it yet, clone bioshell-release repository (https://bitbucket.org/dgront/bioshell-release/src/master/) from Bitbucket:
git clone firstname.lastname@example.org:dgront/bioshell-release.git cd bioshell-release
This should create
bioshell-releasedirectory in your current location. The second line steps into this new directory
cd build cmake ..
builddirectory will contain compilation intermediate files and may be deleted once BioShell is compiled. The first line enters that direcotry, the second command calls
cmaketo set up the compilation process. CMake attempts to set up everything automatically, sometimes however it would require some guidance, e.g. to find the right compiler (see below)
make -j 4
-j 4allows make use 4 cores to run parallel compilations. This command will attempt to compile all targets; the list of all targets can be printed by
make help. As one can see, each executable is a separate target. There are also predefined group targets:
compiles only bioshell library
compiles bioshell library and bioshell toolkit applications, such as seqc and strc
compiles all examples, i.e. all ap_ and ex_ application
Additional parameters for compilation
The procedure described above compiles the package with the default settings: Release build with no profiling. To change
it, you should remove everything from
./build directory and generate new makefiles with new settings:
in order to use a compiler other that the default one (e.g. gcc version 4.8), say:
cmake -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_BUILD_TYPE=Release ..
or to use
icc for instance:
cmake -DCMAKE_CXX_COMPILER=icc -DCMAKE_C_COMPILER=icc -DCMAKE_BUILD_TYPE=Release ..
to brew a debug build, turn
-DCMAKE_BUILD_TYPE=Debug. So to make a debug build without changing the compiler, say just:
cmake -DCMAKE_BUILD_TYPE=Debug ..
to make a profiling build (-pg option) for gcc or Xcode Instruments (https://developer.apple.com/library/ios/documentation/AnalysisTools/Reference/Instruments_User_Reference/TimeProfilerInstrument/TimeProfilerInstrument.html) add
-D PROFILE=ONto the
- Using IDE
In the above examples,
cmake was used to produce makefiles for to compile BioShell.
cmake command may be also used to generate project files for other environments, in particular:
to produce *.xcodeproj file for xcode:
cmake -DCMAKE_BUILD_TYPE=Release -G Xcode
or to prepare solution files for Microsoft Visual Studio (must be run on a Windows machine):
cmake -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 2013"