Debian Codegraph @

src/main.cpp

raw
1 /*****************************************************************************
2 * GATB : Genome Assembly Tool Box
3 * Copyright (C) 2014 INRIA
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Affero General Public License as
7 * published by the Free Software Foundation, either version 3 of the
8 * License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *****************************************************************************/
18
19 // We include the header file for the tool
20 #include <bcalm_1.hpp>
21
22 /********************************************************************************/
23
24 /********************************************************************************/
25
26 int main (int argc, char* argv[])
27 {
28
29 #ifdef GIT_SHA1
30 if(argc > 1 && ( strcmp(argv[1],STR_VERSION)==0 || strcmp(argv[1],"-v")==0 ) ){
31 std::cout << "BCALM 2, version " << VERSION << ", git commit " << GIT_SHA1 << std::endl;
32 std::cout << "Using gatb-core version "<< System::info().getVersion() << std::endl;
33 return EXIT_SUCCESS;
34 }
35 #endif
36
37 try
38 {
39 // We run the tool with the provided command line arguments.
40 bcalm_1().run (argc, argv);
41 }
42 catch (Exception& e)
43 {
44 std::cout << "EXCEPTION: " << e.getMessage() << std::endl;
45 return EXIT_FAILURE;
46 }
47
48 return EXIT_SUCCESS;
49 }
50