From: derek Date: Mon, 22 Nov 2010 17:48:00 +0000 (-0500) Subject: Added proper import of bamtools version info from CMake X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bc876d9d1f57c3c14fba29827a74e858ee527ee4;p=bamtools.git Added proper import of bamtools version info from CMake --- diff --git a/src/toolkit/bamtools.cpp b/src/toolkit/bamtools.cpp index 6c5c1f6..2be9d72 100644 --- a/src/toolkit/bamtools.cpp +++ b/src/toolkit/bamtools.cpp @@ -3,7 +3,7 @@ // Marth Lab, Department of Biology, Boston College // All rights reserved. // --------------------------------------------------------------------------- -// Last modified: 25 October 2010 +// Last modified: 22 November 2010 // --------------------------------------------------------------------------- // Integrates a number of BamTools functionalities into a single executable. // *************************************************************************** @@ -16,6 +16,7 @@ // includes #include #include +#include #include #include "bamtools_convert.h" #include "bamtools_count.h" @@ -28,6 +29,7 @@ #include "bamtools_sort.h" #include "bamtools_split.h" #include "bamtools_stats.h" +#include "bamtools_version.h" using namespace std; using namespace BamTools; @@ -123,8 +125,14 @@ int Help(int argc, char* argv[]) { // print version info int Version(void) { + + stringstream versionStream(""); + versionStream << BAMTOOLS_VERSION_MAJOR << "." + << BAMTOOLS_VERSION_MINOR << "." + << BAMTOOLS_VERSION_BUILD; + cout << endl; - cout << "bamtools " << BAMTOOLS_VERSION << endl; + cout << "bamtools " << versionStream.str() << endl; cout << "Part of BamTools API and toolkit" << endl; cout << "Primary authors: Derek Barnett, Erik Garrison, Michael Stromberg" << endl; cout << "(c) 2009-2010 Marth Lab, Biology Dept., Boston College" << endl;