Skip to content

Commit

Permalink
bumped version and added --Version parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusRainerSchmidt committed Nov 30, 2021
1 parent 5b5e6e7 commit 039e283
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions cmdMa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ int main( int argc, char* argv[] )
generateHelpMessage( xExecutionContext.xParameterSetManager );
return 0;
} // if
if( xExecutionContext.xParameterSetManager.pGeneralParameterSet->pbPrintVerstion->get( ) )
{
std::cout << MA_VERSION << std::endl;
return 0;
} // if

std::pair<int, double> xPreviousProgress = std::make_pair( -1, 0 );
std::cout << "starting alignment." << std::endl;
Expand Down
8 changes: 4 additions & 4 deletions libs/ms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.8)

project("MS Lib" VERSION 2.0.0 DESCRIPTION "Modular Structure library")
project("MS Lib" VERSION 2.0.1 DESCRIPTION "Modular Structure library")


if( PythonLibs_FOUND )
Expand Down Expand Up @@ -199,10 +199,10 @@ endif()

if(NOT RESULT_COMMIT STREQUAL "0" OR NOT RESULT_STATUS STREQUAL "0")
message( "--libMS: WARNING cannot infer version from git (maybe git.exe is not in your environment path?)" )
set(MS_VERSION "Unknown")
set(MA_VERSION "Unknown")
else()
set(MS_VERSION "${PROJECT_VERSION}-${GIT_COMMIT_HASH}${GIT_STATUS}")
message( "--libMS: Version = ${MS_VERSION}" )
set(MA_VERSION "${PROJECT_VERSION}-${GIT_COMMIT_HASH}${GIT_STATUS}")
message( "--libMS: Version = ${MA_VERSION}" )
endif()

configure_file( # @todo so far this only triggers during configure not at build time
Expand Down
4 changes: 3 additions & 1 deletion libs/ms/inc/ms/util/parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ class GeneralParameter : public ParameterSetBase
AlignerParameterPointer<bool> pbUseMaxHardareConcurrency; // Exploit all cores
AlignerParameterPointer<int> piNumberOfThreads; // selected number of threads
AlignerParameterPointer<bool> pbPrintHelpMessage; // Print the help message to stdout
AlignerParameterPointer<bool> pbPrintVerstion; // Print the version to stdout

/* Constructor */
GeneralParameter( )
Expand All @@ -972,7 +973,8 @@ class GeneralParameter : public ParameterSetBase
"Number of threads used in the context of alignments. This options is only available, if "
"'use all processor cores' is off.",
GENERAL_PARAMETER, 1, checkPositiveValue ),
pbPrintHelpMessage( this, "Help", 'h', "Print the complete help text.", GENERAL_PARAMETER, false )
pbPrintHelpMessage( this, "Help", 'h', "Print the complete help text.", GENERAL_PARAMETER, false ),
pbPrintVerstion( this, "Version", 'v', "Print the version and exit.", GENERAL_PARAMETER, false )
{
xSAMOutputPath->fEnabled = [ this ]( void ) { return this->xSAMOutputTypeChoice->uiSelection == 1; };
xSAMOutputFileName->fEnabled = [ this ]( void ) { return this->xSAMOutputTypeChoice->uiSelection == 2; };
Expand Down

0 comments on commit 039e283

Please sign in to comment.