aboutsummaryrefslogtreecommitdiff
path: root/doc/api/cplusplus/examples/example_about.cc
blob: 3008f72d6613d4f40fb83d1c26cd4897c260d04f (plain)
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
30
31
32
33
34
/* vim: set sw=4 sts=4 et foldmethod=syntax : */

/** \file
 *
 * Example \ref example_about.cc "example_about.cc" .
 *
 * \ingroup g_about
 */

/** \example example_about.cc
 *
 * A simple example showing how to use Paludis version macros.
 */

#include <paludis/paludis.hh>
#include <iostream>
#include <cstdlib>

using std::cout;
using std::endl;

int main(int, char *[])
{
    cout << "Built using Paludis " << PALUDIS_VERSION_MAJOR << "." << PALUDIS_VERSION_MINOR
        << "." << PALUDIS_VERSION_MICRO << PALUDIS_VERSION_SUFFIX;

    if (! std::string(PALUDIS_GIT_HEAD).empty())
        cout << " " << PALUDIS_GIT_HEAD;

    cout << endl;

    return EXIT_SUCCESS;
}