Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
KEP-1254: add detail to swarmdb --version
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelsavannah committed Mar 20, 2019
1 parent 896c565 commit dc060c0
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions options/simple_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <json/json.h>
#include <iostream>
#include <fstream>
#include <swarm_version.hpp>
#include <swarm_git_commit.hpp>
#include <boost/algorithm/string.hpp>

using namespace bzn;
Expand Down Expand Up @@ -325,7 +325,15 @@ simple_options::handle_command_line_options(int argc, const char* argv[])

if (vm.count("version"))
{
std::cout << "Bluzelle" << ": v" << SWARM_VERSION << std::endl;
std::cout << "swarmdb" << ": " << SWARM_GIT_COMMIT << std::endl;
#ifdef __OPTIMIZE__
bool opt = true;
#else
bool opt = false;
#endif
std::cout << "compiler version " << __VERSION__ << "; optimize=" << opt << std::endl;


return false;
}

Expand Down Expand Up @@ -377,3 +385,4 @@ simple_options::set(const std::string& option_name, const std::string& option_va
this->vm.erase(option_name);
po::store(parsed, this->vm);
}

0 comments on commit dc060c0

Please sign in to comment.