1/*
2 * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16#include <aws/core/Version.h>
17#include <aws/core/VersionConfig.h>
18
19namespace Aws
20{
21namespace Version
22{
23 const char* GetVersionString()
24 {
25 return AWS_SDK_VERSION_STRING;
26 }
27
28 unsigned GetVersionMajor()
29 {
30 return AWS_SDK_VERSION_MAJOR;
31 }
32
33 unsigned GetVersionMinor()
34 {
35 return AWS_SDK_VERSION_MINOR;
36 }
37
38 unsigned GetVersionPatch()
39 {
40 return AWS_SDK_VERSION_PATCH;
41 }
42
43
44 const char* GetCompilerVersionString()
45 {
46#define xstr(s) str(s)
47#define str(s) #s
48#if defined(_MSC_VER)
49 return "MSVC/" xstr(_MSC_VER);
50#elif defined(__clang__)
51 return "Clang/" xstr(__clang_major__) "." xstr(__clang_minor__) "." xstr(__clang_patchlevel__);
52#elif defined(__GNUC__)
53 return "GCC/" xstr(__GNUC__) "." xstr(__GNUC_MINOR__) "." xstr(__GNUC_PATCHLEVEL__);
54#else
55 return "UnknownCompiler";
56#endif
57#undef str
58#undef xstr
59 }
60} //namespace Version
61} //namespace Aws
62
63
64