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

Commit

Permalink
Merge branch 'devel' into task/ebruck/KEP-1200
Browse files Browse the repository at this point in the history
  • Loading branch information
ebruck committed Mar 26, 2019
2 parents 17ca0e3 + cb7ebe2 commit c282851
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions options/simple_options.cpp
Expand Up @@ -16,8 +16,9 @@
#include <json/json.h>
#include <iostream>
#include <fstream>
#include <swarm_version.hpp>
#include <swarm_git_commit.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/predef.h>

using namespace bzn;
using namespace bzn::option_names;
Expand Down Expand Up @@ -329,7 +330,30 @@ 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;

std::string compiler_name = "unknown";
if (BOOST_COMP_CLANG)
{
compiler_name = "clang";
}

if (BOOST_COMP_GNUC){
compiler_name = "gcc";
}

if (BOOST_COMP_LLVM){
compiler_name = "llvm";
}

#ifdef __OPTIMIZE__
bool opt = true;
#else
bool opt = false;
#endif

std::cout << "compiled by " << compiler_name << __VERSION__ << "; optimize=" << opt << std::endl;

return false;
}

Expand Down Expand Up @@ -381,3 +405,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 c282851

Please sign in to comment.