-
Notifications
You must be signed in to change notification settings - Fork 1.1k
build dev 1.10 pr7 #1933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build dev 1.10 pr7 #1933
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,40 +17,57 @@ if (LEGACY_BUILD) | |
project("aws-cpp-sdk-all" VERSION "${PROJECT_VERSION}" LANGUAGES CXX) | ||
include(legacy_main) | ||
else () | ||
message(STATUS "Building with 1.10 CMake scripts.") | ||
message(STATUS "Building with new CMake scripts.") | ||
string(CONCAT DESCRIPTION_STRING "The AWS SDK for C++ provides a modern C++ (standard version C++11 or later) " | ||
"interface for Amazon Web Services (AWS).") | ||
|
||
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") | ||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE | ||
STRING "Choose the type of build." FORCE) | ||
# cmake-gui helper | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") | ||
endif () | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") | ||
include(sdk_versioning) | ||
obtain_project_version(SDK_PROJECT_VERSION) | ||
|
||
find_package(Git QUIET) # Adding development helper tools as git_hash built when available. | ||
|
||
include(project_version) | ||
obtain_project_version(SDK_PROJECT_VERSION aws-cpp-sdk_GIT_HASH) | ||
|
||
project("aws-cpp-sdk" | ||
LANGUAGES CXX | ||
VERSION ${SDK_PROJECT_VERSION} | ||
DESCRIPTION ${DESCRIPTION_STRING} | ||
HOMEPAGE_URL "https://docs.aws.amazon.com/sdk-for-cpp" | ||
) | ||
|
||
# Setting C++ minimum requirements | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
message(STATUS "Building ${PROJECT_NAME} ${CMAKE_PROJECT_VERSION}") | ||
|
||
# Setting version header for library | ||
configure_file( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Producing the VersionConfig header for the build. |
||
VersionConfig.h.in | ||
src/aws-cpp-sdk-core/include/aws/core/VersionConfig.h | ||
@ONLY | ||
) | ||
|
||
message(WARNING "Anything below this warning is a TODO not yet implemented.") | ||
# Validating config type and setting default if needed | ||
get_property(is_multi_conf_build GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) | ||
if (NOT is_multi_conf_build) | ||
set(allowed_build_types Debug Release RelWithDebInfo MinSizeRel) | ||
# cmake-gui helper | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${allowed_build_types}") | ||
if (NOT CMAKE_BUILD_TYPE) | ||
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") | ||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build." FORCE) | ||
elseif (NOT CMAKE_BUILD_TYPE IN_LIST allowed_build_types) | ||
message(FATAL_ERROR "Unknown build type: ${CMAKE_BUILD_TYPE}") | ||
endif () | ||
endif () | ||
Comment on lines
+53
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Validating that the right build type is requested and setting the default to RelWithDeb if omitted. |
||
option(BUILD_TESTS "If enabled, the SDK will include tests in the build" OFF) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By default, no tests are build, creating option to enable them in the build. |
||
|
||
message(WARNING "Anything below this warning is a TODO not yet implemented.") | ||
message(STATUS "Detecting toolchain and external dependencies.") | ||
message(STATUS "Prepare CRT dependency.") | ||
message(STATUS "Setting up core library.") | ||
message(STATUS "Prepare CRT dependency.") | ||
message(STATUS "Building core library.") | ||
message(STATUS "Building core library tests.") | ||
message(STATUS "Add support for static analysis.") | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.10.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#define AWS_CPP_SDK_VERSION_STRING "@aws-cpp-sdk_VERSION_STRING@" | ||
#define AWS_CPP_SDK_VERSION_MAJOR @aws-cpp-sdk_VERSION_MAJOR@ | ||
#define AWS_CPP_SDK_VERSION_MINOR @aws-cpp-sdk_VERSION_MINOR@ | ||
#define AWS_CPP_SDK_VERSION_PATCH @aws-cpp-sdk_VERSION_PATCH@ | ||
#define AWS_CPP_SDK_GIT_HASH "@aws-cpp-sdk_GIT_HASH@" | ||
Comment on lines
+6
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added CPP tot he prefix to avoid collisions with defines in other SDKs that may be build together. |
||
|
||
// DEPRECATED in 1.10: The follow defines are kept for backward compatibility | ||
// Please prefer the use the new ones defined above | ||
#define AWS_SDK_VERSION_STRING AWS_CPP_SDK_VERSION_STRING | ||
#define AWS_SDK_VERSION_MAJOR AWS_CPP_SDK_VERSION_MAJOR | ||
#define AWS_SDK_VERSION_MINOR AWS_CPP_SDK_VERSION_MINOR | ||
#define AWS_SDK_VERSION_PATCH AWS_CPP_SDK_VERSION_PATCH | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include_guard() | ||
|
||
function(obtain_project_version resultVarVersion resultVarGitHash) | ||
if (GIT_FOUND) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --abbrev=0 --tags | ||
OUTPUT_VARIABLE VERSION_STRING | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
execute_process( | ||
COMMAND ${GIT_EXECUTABLE} rev-parse HEAD | ||
RESULT_VARIABLE git_result | ||
OUTPUT_VARIABLE GIT_HASH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
if (NOT git_result) | ||
set(${resultVarGitHash} ${GIT_HASH} PARENT_SCOPE) | ||
message(STATUS "Building git hash: ${GIT_HASH}") | ||
endif() | ||
Comment on lines
+4
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In dev environments, inside git repository, the version will be inferred from tags and git hash saved to the build. |
||
endif () | ||
|
||
if (NOT VERSION_STRING) # Non DEV build relays on VERSION file updated by release CI | ||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" VERSION_STRING) | ||
endif () | ||
Comment on lines
+22
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In non dev builds, those with no git, the version will be read from a VERSION file in the root of the SDK sourcetree. This file is expected to be updated by CI at the release process. The placement in the root is to have easy access to it for human readers. |
||
|
||
set(${resultVarVersion} ${VERSION_STRING} PARENT_SCOPE) | ||
message(STATUS "SDK project version: ${VERSION_STRING}") | ||
endfunction() |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,6 @@ namespace Version | |
AWS_CORE_API unsigned GetVersionMinor(); | ||
AWS_CORE_API unsigned GetVersionPatch(); | ||
AWS_CORE_API const char* GetCompilerVersionString(); | ||
AWS_CORE_API const char* GetGitHash(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For development builds, on releases this is empty. |
||
} //namespace Version | ||
} //namespace Aws |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,15 @@ | |
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
// DEPRECATED: This file is used by legacy_build generators only | ||
|
||
#define AWS_SDK_VERSION_STRING "1.9.227" | ||
#define AWS_SDK_VERSION_MAJOR 1 | ||
#define AWS_SDK_VERSION_MINOR 9 | ||
#define AWS_SDK_VERSION_PATCH 227 | ||
// Forward compatible definitions | ||
#define AWS_CPP_SDK_VERSION_STRING AWS_SDK_VERSION_STRING | ||
#define AWS_CPP_SDK_VERSION_MAJOR AWS_SDK_VERSION_MAJOR | ||
#define AWS_CPP_SDK_VERSION_MINOR AWS_SDK_VERSION_MINOR | ||
#define AWS_CPP_SDK_VERSION_PATCH AWS_SDK_VERSION_PATCH | ||
#define AWS_CPP_SDK_GIT_HASH "NoHashAvailableInLegacyBuild" | ||
Comment on lines
+12
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added for forward compatibility. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,15 @@ | |
* SPDX-License-Identifier: Apache-2.0. | ||
*/ | ||
|
||
// DEPRECATED: This file is used by legacy_build generators only | ||
|
||
#define AWS_SDK_VERSION_STRING "@AWSSDK_VERSION_STRING@" | ||
#define AWS_SDK_VERSION_MAJOR @AWSSDK_VERSION_MAJOR@ | ||
#define AWS_SDK_VERSION_MINOR @AWSSDK_VERSION_MINOR@ | ||
#define AWS_SDK_VERSION_PATCH @AWSSDK_VERSION_PATCH@ | ||
#define AWS_SDK_VERSION_PATCH @AWSSDK_VERSION_PATCH@ | ||
// Forward compatible definitions | ||
#define AWS_CPP_SDK_VERSION_STRING AWS_SDK_VERSION_STRING | ||
#define AWS_CPP_SDK_VERSION_MAJOR AWS_SDK_VERSION_MAJOR | ||
#define AWS_CPP_SDK_VERSION_MINOR AWS_SDK_VERSION_MINOR | ||
#define AWS_CPP_SDK_VERSION_PATCH AWS_SDK_VERSION_PATCH | ||
#define AWS_CPP_SDK_GIT_HASH "NoHashAvailableInLegacyBuild" | ||
Comment on lines
+12
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added for forward compatibilty There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I know CPP SDK sounds better, but we have AWS SDK CPP in most of the places. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking in 1.11 release it may not make sense to keep updating this value.