Skip to content

Commit

Permalink
Added --version switch
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiandeorowicz committed Oct 22, 2024
1 parent d57e52e commit e3cc571
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
#include <string>
#include "params.h"

const std::string LZ_ANI_VER = "lz-ani 1.2.1";
const std::string LZ_ANI_DATE = "2024-10-11";
const std::string LZ_ANI_VER = "lz-ani 1.2.2";
const std::string LZ_ANI_VERSION = "1.2.2";
const std::string LZ_ANI_DATE = "2024-10-22";
const std::string LZ_ANI_AUTHORS = "Sebastian Deorowicz, Adam Gudys";
const std::string LZ_ANI_INFO = LZ_ANI_VER + " (" + LZ_ANI_DATE + ") by " + LZ_ANI_AUTHORS;

Expand Down
9 changes: 9 additions & 0 deletions src/lz-ani.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ vector<string> load_input_names(const string& fn)
// ****************************************************************************
bool parse_params(int argc, char** argv)
{
if (argc == 2 && argv[1] == "--version"s)
{
cerr << LZ_ANI_VERSION << endl;
return true;
}

if (argc < 3)
{
usage();
Expand Down Expand Up @@ -335,6 +341,9 @@ int main(int argc, char **argv)
if (!parse_params(argc, argv))
return 0;

if (working_mode == working_mode_t::none)
return 0;

params.adjust_threads();

CLZMatcher lzm(params);
Expand Down

0 comments on commit e3cc571

Please sign in to comment.