aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXVersion.cpp
blob: 0e2076145637aa5e4467d686db1f15bae24fa3e1 (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
30
31
32
33
34
35
36
37
/* Copyright 2022 Axel Huebl
 *
 * This file is part of WarpX.
 *
 * License: BSD-3-Clause-LBNL
 */
#include "WarpX.H"
#include "Utils/WarpXVersion.H"

#include <string>


std::string
WarpX::Version ()
{
    std::string version;
#ifdef WARPX_GIT_VERSION
    version = std::string(WARPX_GIT_VERSION);
#endif
    if( version.empty() )
        return std::string("Unknown");
    else
        return version;
}

std::string
WarpX::PicsarVersion ()
{
    std::string version;
#ifdef PICSAR_GIT_VERSION
    version = std::string(PICSAR_GIT_VERSION);
#endif
    if( version.empty() )
        return std::string("Unknown");
    else
        return version;
}