aboutsummaryrefslogtreecommitdiff
path: root/src/main/main.cpp
blob: 8c07d1fb9ddf1c36c3d8f7dd1910ed2b391334c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <boost/program_options.hpp>
#include <iostream>
#include "command_line_helper.h"

using namespace std;

namespace po = boost::program_options;

int main(int argc, const char* argv[]) {
    // Creates the command line options
    po::options_description desc = get_options_desc();

    po::variables_map vm;
    po::store(po::parse_command_line(argc, argv, desc), vm);
    po::notify(vm);

    if (vm.count("help")) {
        cout << desc << "\n";
        return 1;
    }

    if (vm.count("compression")) {
        cout << "Compression level was set to "
             << vm["compression"].as<int>() << ".\n";
    } else {
        cout << "Compression level was not set.\n";
    }
}