Skip to content

build dev 1.10 pr12 #2041

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

Merged
merged 1 commit into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,7 @@ else ()
endif ()

# -- Dependencies --
add_subdirectory(dependencies)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
# Testing Dependencies
if (BUILD_TESTING)
message(STATUS "Building tests")
# Testing dependency
find_package(GTest 1.11 REQUIRED)
include(GoogleTest) # for gtest_discover_tests()
endif ()
endif ()
include(dependencies)

# -- main build targets --
add_subdirectory(src)
Expand All @@ -121,9 +112,6 @@ else ()

message(WARNING "Anything below this warning is a TODO not yet implemented.")

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.")
message(STATUS "Building client libraries.")
Expand Down
12 changes: 0 additions & 12 deletions cmake/Findaws-crt-cpp.cmake

This file was deleted.

22 changes: 22 additions & 0 deletions cmake/dependencies.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Project dependencies http library (curl or OS), tinyxml2, cJSON, ssl (open or other), CRT
find_package(CURL REQUIRED)
find_package(ZLIB REQUIRED)
find_package(OpenSSL REQUIRED COMPONENTS Crypto)
pkg_check_modules(tinyxml2 REQUIRED IMPORTED_TARGET tinyxml2>=9.0.0)
pkg_check_modules(CJSON REQUIRED IMPORTED_TARGET libcjson>=1.7.15)
message(STATUS "Checking for aws-crt-cpp version 0.18.2")
find_package(aws-crt-cpp 0.18.2 EXACT REQUIRED)
message(STATUS " Found aws-crt-cpp version ${aws-crt-cpp_VERSION}")
# Infer dirs and libs temporarily from aws-crt-cpp_DIR until they get shipped in the new CRT version.
set(aws-crt-cpp_INCLUDE_DIR "${aws-crt-cpp_DIR}/../../../include")
set(aws-crt-cpp_INCLUDE_DIRS "${aws-crt-cpp_DIR}/../../../include")
set(aws-crt-cpp_LIBRARY_DIRS "${aws-crt-cpp_DIR}/../..")
set(aws-crt-cpp_LIBRARIES aws-crt-cpp aws-c-common aws-c-event-stream aws-c-mqtt aws-c-s3 aws-c-auth aws-c-sdkutils aws-c-http aws-c-compression aws-c-io s2n aws-checksums aws-c-common aws-c-cal)
set(aws-crt-cpp_LIBRARY_DIRS "${aws-crt-cpp_DIR}/..")

if (BUILD_TESTING)
message(STATUS "Building tests")
# Testing dependency
find_package(GTest 1.11 REQUIRED)
include(GoogleTest) # for gtest_discover_tests()
endif ()
6 changes: 4 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// MSVC
"msvc", "MSFT", "LPDWORD", "DATAW", "mkgmtime", "vscprintf", "wtoi", "msxml", "runtimeobject", "winhttp", "Wininet",
// Crypto
"decryptor", "encryptor", "NTSTATUS", "PBYTE", "PUCHAR", "noconf", "HAMC", "PBCRYPT", "BCRYPT", "libcrypto", "AWSLC",
"decryptor", "encryptor", "NTSTATUS", "PBYTE", "PUCHAR", "noconf", "HAMC", "PBCRYPT", "BCRYPT", "libcrypto", "AWSLC", "COMMONCRYPTO",
// EC2
"IMDS",
// Cognito
Expand All @@ -47,6 +47,8 @@
// in DefaultRateLimiter
"renormalize",
// parameters defined in tinyxml2
"uval"
"uval",
// negated option in parameters
"DNON"
]
}
7 changes: 0 additions & 7 deletions dependencies/CMakeLists.txt

This file was deleted.

19 changes: 10 additions & 9 deletions src/aws-cpp-sdk-core-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,21 @@ if (NOT LEGACY_BUILD)
)
add_subdirectory(testing-resources)

add_executable(
aws-core-version
${CMAKE_CURRENT_LIST_DIR}/VersionTests.cpp
${CMAKE_CURRENT_LIST_DIR}/RunTests.cpp
)
add_executable(aws_core_test)
target_link_libraries(
aws-core-version
aws_core_test
PRIVATE GTest::GTest
PRIVATE aws-sdk-cpp::core
PRIVATE aws-sdk-cpp::test-resources
)
target_sources(aws_core_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/RunTests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/VersionTests.cpp
)
gtest_discover_tests(aws_core_test)

# add_subdirectory(monitoring)
message(WARNING "Not testing everything yet...")
message(WARNING "Building core test with new cmake scripts not yet implemented")
else ()
add_project(aws-cpp-sdk-core-tests
"Tests for the AWS Core C++ Library"
Expand Down Expand Up @@ -145,4 +146,4 @@ else ()
if (NOT CMAKE_CROSSCOMPILING)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
endif ()
endif ()
endif ()
4 changes: 2 additions & 2 deletions src/aws-cpp-sdk-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ if (NOT LEGACY_BUILD)
)
target_link_directories(
aws-sdk-cpp-core
PUBLIC ${aws-crt-cpp_LIB_DIRS}
PUBLIC ${aws-crt-cpp_LIBRARY_DIRS}
PUBLIC ${CJSON_LIBRARY_DIRS}
PUBLIC ${tinyxml2_LIBRARY_DIRS}
)
target_link_libraries(
aws-sdk-cpp-core
aws-crt-cpp aws-c-common aws-checksums
${aws-crt-cpp_LIBRARIES}
${CJSON_LIBRARIES}
${tinyxml2_LIBRARIES}
)
Expand Down
1 change: 0 additions & 1 deletion src/aws-cpp-sdk-core/source/utils/crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
message(WARNING "not complete implementation yet")
if (USE_OPENSSL)
add_subdirectory(openssl)
endif ()
Expand Down