gatb.core-API-0.0.0
|
You use GATB-CORE by creating a new tool project, with the following script:
where 'directory' is the directory where the project will be created and 'toolName' is the name of the project. The script will automatically creates the full path directory/toolName to deploy a self-contained tool.
The directory where the project is created has no link to any external resources. You can therefore move it anywhere you want.
Such a project can be a start point for building applications based on GATB-CORE.
By default, the following part will be included in the project:
The 'thirdparty' directory is only available for tool created outside the GATB-Tools repository. Tools located within GATB-Tools rely on a common GATB-Core sub-module already available in this repository.
It is advised to use:
It is worth noting that 'tools' directory is organised using sub-folders; by default, there is at least one such sub-folder called 'toolName'. It holds the source code of the tool.
However, when considering a more complex software, it could be nice to setup several "sub-tools", each of them making a particular feature. In that case, you can easily create several "sub-tool" folders inside "tools", each of them having a "src" folder containing the source code, as well as a "main.cpp", for each feature.
Using this organisation has a big advantage: the provided CMakeLists.txt is aware of that, so you do not have to edit the CMake file when you add a new "sub-tool". As a real example, you can have a look at the DiscoSNP software.
To build your project, you should do the following
cd [path-to-tool-home] mkdir build; cd build; cmake ..; make -j8
Then, you should get a binary holding the name of the project within 'build/tools'.
The first compilation should take some time since the GATB-CORE library is generated.
Note that all the needed material is included in the generated project (in particular the gatb::core library and the header files), so you can move it wherever you want. Note also that you won't have to do any tricky configuration to build the binary; you just have to do cmake+make and you will have your binaries in the build/tools directory.
You can set a version number to your project by editing the beginning of CMakeLists.txt file located in the tool main directory or by running cmake like this:
You can prepare your tool for distribution using:
With X, Y and Z being major, minor and patch release numbers, respectively.
Then, you should get two 'tar.gz' files within 'build', one containing the binary release and the other the source codes.
Note: the script re-built the entire tool from its sources to ensure a clean build process.
If you are interested in using an IDE to develop c++ source codes relying on the GATB-Core library, we have written this manual to explain how to setup Eclipse c++ framework:
https://gatb.inria.fr/use-eclipse-to-develop-gatb-core-softwares/