# set BamTools version information
set( BamTools_VERSION_MAJOR 2 )
-set( BamTools_VERSION_MINOR 1 )
-set( BamTools_VERSION_BUILD 1 )
+set( BamTools_VERSION_MINOR 2 )
+set( BamTools_VERSION_BUILD 0 )
# set our library and executable destination dirs
set( EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin" )
# define compiler flags for all code
set( CMAKE_BUILD_TYPE Release )
add_definitions( -Wall -D_FILE_OFFSET_BITS=64 )
+
+# -----------------------------------------------
+# handle platform-/environment-specific defines
+
+# If planning to run in Node.js environment, run:
+# cmake -DEnableNodeJS=true
+if( EnableNodeJS )
+ add_definitions( -DSYSTEM_NODEJS=1 )
+endif()
+
+# If running on SunOS
if( "${CMAKE_SYSTEM_NAME}" MATCHES "SunOS" )
- add_definitions( -DSUN_OS )
+ add_definitions( -DSUN_OS )
endif()
+# -------------------------------------------
+
# add our includes root path
include_directories( src )
# create main BamTools API shared library
add_library( BamTools SHARED ${BamToolsAPISources} )
set_target_properties( BamTools PROPERTIES
- SOVERSION "2.1.0"
+ SOVERSION "2.2.0"
OUTPUT_NAME "bamtools" )
# create main BamTools API static library
// BamPipe_p.cpp (c) 2011 Derek Barnett
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
-// Last modified: 10 November 2011 (DB)
+// Last modified: 18 October 2012 (DB)
// ---------------------------------------------------------------------------
// Provides BAM pipe-specific IO behavior
// ***************************************************************************
Close();
// open stdin/stdout depending on requested openmode
+#if defined( SYSTEM_NODEJS ) && SYSTEM_NODEJS == 1
+ if ( mode == IBamIODevice::ReadOnly )
+ m_stream = stdin;
+ else if ( mode == IBamIODevice::WriteOnly )
+ m_stream = stdout;
+#else
if ( mode == IBamIODevice::ReadOnly )
m_stream = freopen(0, "rb", stdin);
else if ( mode == IBamIODevice::WriteOnly )
m_stream = freopen(0, "wb", stdout);
+#endif // SYSTEM_NODEJS
+
else {
const string errorType = string( (mode == IBamIODevice::ReadWrite) ? "unsupported"
: "unknown" );
# set BamTools application properties
set_target_properties( bamtools_cmd PROPERTIES
- VERSION 2.1.1
+ VERSION 2.2.0
OUTPUT_NAME "bamtools"
)
# make version info available in application
// bamtools.cpp (c) 2010 Derek Barnett, Erik Garrison
// Marth Lab, Department of Biology, Boston College
// ---------------------------------------------------------------------------
-// Last modified: 18 May 2011 (DB)
+// Last modified: 12 October 2012 (DB)
// ---------------------------------------------------------------------------
// Integrates a number of BamTools functionalities into a single executable.
// ***************************************************************************
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-2011 Marth Lab, Biology Dept., Boston College" << endl;
+ cout << "(c) 2009-2012 Marth Lab, Biology Dept., Boston College" << endl;
cout << endl;
return EXIT_SUCCESS;
}
# set BamTools library properties
set_target_properties( BamTools-utils PROPERTIES
- SOVERSION 2.1.0
+ SOVERSION 2.2.0
OUTPUT_NAME bamtools-utils
)