aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/aws-sdk-cpp/aws-cpp-sdk-core/source/Version.cpp
blob: 35291906b772f7ebc1e2c4fc7c092c762970afed (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#include <aws/core/Version.h>
#include <aws/core/VersionConfig.h>

namespace Aws
{
namespace Version
{
  const char* GetVersionString()
  {
    return AWS_SDK_VERSION_STRING;
  }

  unsigned GetVersionMajor()
  {
    return AWS_SDK_VERSION_MAJOR;
  }

  unsigned GetVersionMinor()
  {
    return AWS_SDK_VERSION_MINOR;
  }

  unsigned GetVersionPatch()
  {
    return AWS_SDK_VERSION_PATCH;
  }


  const char* GetCompilerVersionString()
  {
#define xstr(s) str(s)
#define str(s) #s
#if defined(_MSC_VER)
      return "MSVC/" xstr(_MSC_VER);
#elif defined(__clang__)
      return "Clang/" xstr(__clang_major__) "."  xstr(__clang_minor__) "." xstr(__clang_patchlevel__);
#elif defined(__GNUC__)
      return "GCC/" xstr(__GNUC__) "."  xstr(__GNUC_MINOR__) "." xstr(__GNUC_PATCHLEVEL__);
#else
      return "UnknownCompiler";
#endif
#undef str
#undef xstr
  }
} //namespace Version
} //namespace Aws