From dc12eb50456dff52e017bd30dac68be52f251ba4 Mon Sep 17 00:00:00 2001 From: Steve Kim <86316075+sbSteveK@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:06:21 -0700 Subject: [PATCH 1/4] move mac-only tls info to main README (#754) --- README.md | 9 +++++++++ documents/FAQ.md | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 17b330a98..3156fb39c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ __Jump To:__ * [Supported Architectures](#supported-architectures) * [Installation](#installation) * [Samples](./samples) +* [Mac-Only TLS Behavior](#mac-only-tls-behavior) * [Getting Help](#getting-help) * [FAQ](./documents/FAQ.md) * [API Docs](https://aws.github.io/aws-iot-device-sdk-cpp-v2/) @@ -108,6 +109,14 @@ existing `libcrypto`, instead of building its own copy. [Samples README](./samples) +### Mac-Only TLS Behavior + +Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level: + +``` +static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided. +``` + ## Getting Help The best way to interact with our team is through GitHub. You can open a [discussion](https://github.com/aws/aws-iot-device-sdk-cpp-v2/discussions) for guidance questions or an [issue](https://github.com/aws/aws-iot-device-sdk-cpp-v2/issues/new/choose) for bug reports, or feature requests. You may also find help on community resources such as [StackOverFlow](https://stackoverflow.com/questions/tagged/aws-iot) with the tag [#aws-iot](https://stackoverflow.com/questions/tagged/aws-iot) or if you have a support plan with [AWS Support](https://aws.amazon.com/premiumsupport/), you can also create a new support case. diff --git a/documents/FAQ.md b/documents/FAQ.md index ccd0f7045..67d529789 100644 --- a/documents/FAQ.md +++ b/documents/FAQ.md @@ -8,7 +8,6 @@ * [Detecting connection loss (tldr use keepAliveTimeSecs and pingTimeoutMs)](#connection-loss) * [How to use a Pre-Built aws-crt-cpp (Most useful for development of this package)](#prebuilt-aws-crt-cpp) * [I am experiencing deadlocks](#i-am-experiencing-deadlocks) -* [Mac-Only TLS Behavior](#mac-only-tls-behavior) * [How do debug in VSCode?](#how-do-debug-in-vscode) * [What certificates do I need?](#what-certificates-do-i-need) * [I still have more questions about this sdk?](#i-still-have-more-questions-about-this-sdk) @@ -82,14 +81,6 @@ cmake --build . --target install You MUST NOT perform blocking operations on any callback, or you will cause a deadlock. For example: in the on_publish_received callback, do not send a publish, and then wait for the future to complete within the callback. The Client cannot do work until your callback returns, so the thread will be stuck. -### Mac-Only TLS Behavior - -Please note that on Mac, once a private key is used with a certificate, that certificate-key pair is imported into the Mac Keychain. All subsequent uses of that certificate will use the stored private key and ignore anything passed in programmatically. Beginning in v1.7.3, when a stored private key from the Keychain is used, the following will be logged at the "info" log level: - -``` -static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided. -``` - ### How do debug in VSCode? Here is an example launch.json file to run the pubsub sample From 8a0a23e645ef6d46fc78f555553b490f293a1c1c Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Mon, 28 Oct 2024 08:55:11 -0700 Subject: [PATCH 2/4] Update submodules and cmake versions (#755) Co-authored-by: Bret Ambrose --- CMakeLists.txt | 2 +- README.md | 2 +- crt/aws-c-iot | 2 +- crt/aws-crt-cpp | 2 +- deviceadvisor/tests/mqtt_connect/CMakeLists.txt | 2 +- deviceadvisor/tests/mqtt_publish/CMakeLists.txt | 2 +- deviceadvisor/tests/mqtt_subscribe/CMakeLists.txt | 2 +- deviceadvisor/tests/shadow_update/CMakeLists.txt | 2 +- devicedefender/CMakeLists.txt | 2 +- discovery/CMakeLists.txt | 2 +- eventstream_rpc/CMakeLists.txt | 2 +- greengrass_ipc/CMakeLists.txt | 2 +- identity/CMakeLists.txt | 2 +- iotdevicecommon/CMakeLists.txt | 2 +- jobs/CMakeLists.txt | 2 +- samples/CMakeLists.txt | 2 +- samples/device_defender/basic_report/CMakeLists.txt | 2 +- samples/device_defender/mqtt5_basic_report/CMakeLists.txt | 2 +- samples/fleet_provisioning/fleet_provisioning/CMakeLists.txt | 2 +- .../fleet_provisioning/mqtt5_fleet_provisioning/CMakeLists.txt | 2 +- samples/greengrass/basic_discovery/CMakeLists.txt | 2 +- samples/greengrass/ipc/CMakeLists.txt | 2 +- samples/jobs/job_execution/CMakeLists.txt | 2 +- samples/jobs/mqtt5_job_execution/CMakeLists.txt | 2 +- samples/mqtt/basic_connect/CMakeLists.txt | 2 +- samples/mqtt/cognito_connect/CMakeLists.txt | 2 +- samples/mqtt/custom_authorizer_connect/CMakeLists.txt | 2 +- samples/mqtt/pkcs11_connect/CMakeLists.txt | 2 +- samples/mqtt/pkcs12_connect/CMakeLists.txt | 2 +- samples/mqtt/websocket_connect/CMakeLists.txt | 2 +- samples/mqtt/windows_cert_connect/CMakeLists.txt | 2 +- samples/mqtt/x509_credentials_provider_connect/CMakeLists.txt | 2 +- samples/mqtt5/mqtt5_pubsub/CMakeLists.txt | 2 +- samples/mqtt5/mqtt5_shared_subscription/CMakeLists.txt | 2 +- samples/pub_sub/basic_pub_sub/CMakeLists.txt | 2 +- samples/pub_sub/cycle_pub_sub/CMakeLists.txt | 2 +- samples/secure_tunneling/secure_tunnel/CMakeLists.txt | 2 +- samples/secure_tunneling/tunnel_notification/CMakeLists.txt | 2 +- samples/shadow/mqtt5_shadow_sync/CMakeLists.txt | 2 +- samples/shadow/shadow_sync/CMakeLists.txt | 2 +- secure_tunneling/CMakeLists.txt | 2 +- secure_tunneling/tests/CMakeLists.txt | 1 - servicetests/tests/FleetProvisioning/CMakeLists.txt | 2 +- servicetests/tests/JobsExecution/CMakeLists.txt | 2 +- servicetests/tests/ShadowUpdate/CMakeLists.txt | 2 +- shadow/CMakeLists.txt | 2 +- 46 files changed, 45 insertions(+), 46 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f5c133aa..b9e38de0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(AwsGetVersion) diff --git a/README.md b/README.md index 3156fb39c..d85047010 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ __Jump To:__ ### Minimum Requirements * C++ 11 or higher * Clang 3.9+ or GCC 4.8+ or MSVC 2015+ -* CMake 3.1+ +* CMake 3.9+ [Step-by-step instructions](./documents/PREREQUISITES.md) diff --git a/crt/aws-c-iot b/crt/aws-c-iot index b3fe01586..aab341f10 160000 --- a/crt/aws-c-iot +++ b/crt/aws-c-iot @@ -1 +1 @@ -Subproject commit b3fe015865d7ead9fe7c9df8f8c6b38c37a51f00 +Subproject commit aab341f10bfd1e99da5202b8712b547443698e36 diff --git a/crt/aws-crt-cpp b/crt/aws-crt-cpp index 17e30acb7..fbd5310be 160000 --- a/crt/aws-crt-cpp +++ b/crt/aws-crt-cpp @@ -1 +1 @@ -Subproject commit 17e30acb7d6338a7b180c0cd522de0b4c51ceadd +Subproject commit fbd5310be54cc853807c06e85a9290560fc8f986 diff --git a/deviceadvisor/tests/mqtt_connect/CMakeLists.txt b/deviceadvisor/tests/mqtt_connect/CMakeLists.txt index 528562934..903b1dd7d 100644 --- a/deviceadvisor/tests/mqtt_connect/CMakeLists.txt +++ b/deviceadvisor/tests/mqtt_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt_connect CXX) diff --git a/deviceadvisor/tests/mqtt_publish/CMakeLists.txt b/deviceadvisor/tests/mqtt_publish/CMakeLists.txt index 34e7a56ed..2013ee1f2 100644 --- a/deviceadvisor/tests/mqtt_publish/CMakeLists.txt +++ b/deviceadvisor/tests/mqtt_publish/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt_publish CXX) diff --git a/deviceadvisor/tests/mqtt_subscribe/CMakeLists.txt b/deviceadvisor/tests/mqtt_subscribe/CMakeLists.txt index 2bdaa4f14..dbb8290a1 100644 --- a/deviceadvisor/tests/mqtt_subscribe/CMakeLists.txt +++ b/deviceadvisor/tests/mqtt_subscribe/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt_subscribe CXX) diff --git a/deviceadvisor/tests/shadow_update/CMakeLists.txt b/deviceadvisor/tests/shadow_update/CMakeLists.txt index dd7e853d4..409358b21 100644 --- a/deviceadvisor/tests/shadow_update/CMakeLists.txt +++ b/deviceadvisor/tests/shadow_update/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(shadow_update CXX) diff --git a/devicedefender/CMakeLists.txt b/devicedefender/CMakeLists.txt index 4040ca76f..4104c6b3b 100644 --- a/devicedefender/CMakeLists.txt +++ b/devicedefender/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(IotDeviceDefender-cpp LANGUAGES CXX) diff --git a/discovery/CMakeLists.txt b/discovery/CMakeLists.txt index 58e364e36..d592212ff 100644 --- a/discovery/CMakeLists.txt +++ b/discovery/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(Discovery-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/eventstream_rpc/CMakeLists.txt b/eventstream_rpc/CMakeLists.txt index 5e5aa13b6..9904496d3 100644 --- a/eventstream_rpc/CMakeLists.txt +++ b/eventstream_rpc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(EventstreamRpc-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/greengrass_ipc/CMakeLists.txt b/greengrass_ipc/CMakeLists.txt index 1e66deb48..911650ec9 100644 --- a/greengrass_ipc/CMakeLists.txt +++ b/greengrass_ipc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(GreengrassIpc-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/identity/CMakeLists.txt b/identity/CMakeLists.txt index e843c0ff5..6a29bfaaf 100644 --- a/identity/CMakeLists.txt +++ b/identity/CMakeLists.txt @@ -1,6 +1,6 @@ # This file is generated -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(IotIdentity-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/iotdevicecommon/CMakeLists.txt b/iotdevicecommon/CMakeLists.txt index 05fbcb0c8..a4fb4e0fc 100644 --- a/iotdevicecommon/CMakeLists.txt +++ b/iotdevicecommon/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(IotDeviceCommon-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/jobs/CMakeLists.txt b/jobs/CMakeLists.txt index b1d054924..79b62ea0e 100644 --- a/jobs/CMakeLists.txt +++ b/jobs/CMakeLists.txt @@ -1,6 +1,6 @@ # This file is generated -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(IotJobs-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 312dce978..600180149 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(aws-iot-device-sdk-cpp-v2-samples) diff --git a/samples/device_defender/basic_report/CMakeLists.txt b/samples/device_defender/basic_report/CMakeLists.txt index a973fcb4b..0e54da9d3 100644 --- a/samples/device_defender/basic_report/CMakeLists.txt +++ b/samples/device_defender/basic_report/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(basic-report CXX) diff --git a/samples/device_defender/mqtt5_basic_report/CMakeLists.txt b/samples/device_defender/mqtt5_basic_report/CMakeLists.txt index ecb8ef996..f7f87ccb0 100644 --- a/samples/device_defender/mqtt5_basic_report/CMakeLists.txt +++ b/samples/device_defender/mqtt5_basic_report/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt5-basic-report CXX) diff --git a/samples/fleet_provisioning/fleet_provisioning/CMakeLists.txt b/samples/fleet_provisioning/fleet_provisioning/CMakeLists.txt index 52b9fb458..71b470d6d 100644 --- a/samples/fleet_provisioning/fleet_provisioning/CMakeLists.txt +++ b/samples/fleet_provisioning/fleet_provisioning/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(fleet-provisioning CXX) diff --git a/samples/fleet_provisioning/mqtt5_fleet_provisioning/CMakeLists.txt b/samples/fleet_provisioning/mqtt5_fleet_provisioning/CMakeLists.txt index b13a3f34d..644023257 100644 --- a/samples/fleet_provisioning/mqtt5_fleet_provisioning/CMakeLists.txt +++ b/samples/fleet_provisioning/mqtt5_fleet_provisioning/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt5-fleet-provisioning CXX) diff --git a/samples/greengrass/basic_discovery/CMakeLists.txt b/samples/greengrass/basic_discovery/CMakeLists.txt index 05bdb5a6d..b565c8d50 100644 --- a/samples/greengrass/basic_discovery/CMakeLists.txt +++ b/samples/greengrass/basic_discovery/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(basic-discovery CXX) diff --git a/samples/greengrass/ipc/CMakeLists.txt b/samples/greengrass/ipc/CMakeLists.txt index 646a7868f..e7b96c8e0 100644 --- a/samples/greengrass/ipc/CMakeLists.txt +++ b/samples/greengrass/ipc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(greengrass-ipc CXX) diff --git a/samples/jobs/job_execution/CMakeLists.txt b/samples/jobs/job_execution/CMakeLists.txt index a0ce228b7..c0009043c 100644 --- a/samples/jobs/job_execution/CMakeLists.txt +++ b/samples/jobs/job_execution/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(job-execution CXX) diff --git a/samples/jobs/mqtt5_job_execution/CMakeLists.txt b/samples/jobs/mqtt5_job_execution/CMakeLists.txt index 0affcba5c..ec06a6d41 100644 --- a/samples/jobs/mqtt5_job_execution/CMakeLists.txt +++ b/samples/jobs/mqtt5_job_execution/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt5-job-execution CXX) diff --git a/samples/mqtt/basic_connect/CMakeLists.txt b/samples/mqtt/basic_connect/CMakeLists.txt index f80d0d512..0174831a0 100644 --- a/samples/mqtt/basic_connect/CMakeLists.txt +++ b/samples/mqtt/basic_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(basic-connect CXX) diff --git a/samples/mqtt/cognito_connect/CMakeLists.txt b/samples/mqtt/cognito_connect/CMakeLists.txt index 4e5f2a8b0..394ebe1c4 100644 --- a/samples/mqtt/cognito_connect/CMakeLists.txt +++ b/samples/mqtt/cognito_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(cognito-connect CXX) diff --git a/samples/mqtt/custom_authorizer_connect/CMakeLists.txt b/samples/mqtt/custom_authorizer_connect/CMakeLists.txt index 4a758056b..266c53351 100644 --- a/samples/mqtt/custom_authorizer_connect/CMakeLists.txt +++ b/samples/mqtt/custom_authorizer_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(custom-authorizer-connect CXX) diff --git a/samples/mqtt/pkcs11_connect/CMakeLists.txt b/samples/mqtt/pkcs11_connect/CMakeLists.txt index e1f3c5d4e..e512589f0 100644 --- a/samples/mqtt/pkcs11_connect/CMakeLists.txt +++ b/samples/mqtt/pkcs11_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(pkcs11-connect CXX) diff --git a/samples/mqtt/pkcs12_connect/CMakeLists.txt b/samples/mqtt/pkcs12_connect/CMakeLists.txt index b257f8b37..43c996fad 100644 --- a/samples/mqtt/pkcs12_connect/CMakeLists.txt +++ b/samples/mqtt/pkcs12_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(pkcs12-connect CXX) diff --git a/samples/mqtt/websocket_connect/CMakeLists.txt b/samples/mqtt/websocket_connect/CMakeLists.txt index 9b99fc7c2..7d7253569 100644 --- a/samples/mqtt/websocket_connect/CMakeLists.txt +++ b/samples/mqtt/websocket_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(websocket-connect CXX) diff --git a/samples/mqtt/windows_cert_connect/CMakeLists.txt b/samples/mqtt/windows_cert_connect/CMakeLists.txt index 551a5dcc1..4448aa28d 100644 --- a/samples/mqtt/windows_cert_connect/CMakeLists.txt +++ b/samples/mqtt/windows_cert_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(windows-cert-connect CXX) diff --git a/samples/mqtt/x509_credentials_provider_connect/CMakeLists.txt b/samples/mqtt/x509_credentials_provider_connect/CMakeLists.txt index da58e6d30..48b55ab3b 100644 --- a/samples/mqtt/x509_credentials_provider_connect/CMakeLists.txt +++ b/samples/mqtt/x509_credentials_provider_connect/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(x509-credentials-provider-connect CXX) diff --git a/samples/mqtt5/mqtt5_pubsub/CMakeLists.txt b/samples/mqtt5/mqtt5_pubsub/CMakeLists.txt index b2d6ddafa..5435c3f58 100644 --- a/samples/mqtt5/mqtt5_pubsub/CMakeLists.txt +++ b/samples/mqtt5/mqtt5_pubsub/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt5_pubsub CXX) diff --git a/samples/mqtt5/mqtt5_shared_subscription/CMakeLists.txt b/samples/mqtt5/mqtt5_shared_subscription/CMakeLists.txt index b366a1618..eae2822d9 100644 --- a/samples/mqtt5/mqtt5_shared_subscription/CMakeLists.txt +++ b/samples/mqtt5/mqtt5_shared_subscription/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt5_shared_subscription CXX) diff --git a/samples/pub_sub/basic_pub_sub/CMakeLists.txt b/samples/pub_sub/basic_pub_sub/CMakeLists.txt index c50d4227f..21e471903 100644 --- a/samples/pub_sub/basic_pub_sub/CMakeLists.txt +++ b/samples/pub_sub/basic_pub_sub/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(basic-pub-sub CXX) diff --git a/samples/pub_sub/cycle_pub_sub/CMakeLists.txt b/samples/pub_sub/cycle_pub_sub/CMakeLists.txt index 9b11689e2..947aaa0a5 100644 --- a/samples/pub_sub/cycle_pub_sub/CMakeLists.txt +++ b/samples/pub_sub/cycle_pub_sub/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(cycle-pub-sub CXX) diff --git a/samples/secure_tunneling/secure_tunnel/CMakeLists.txt b/samples/secure_tunneling/secure_tunnel/CMakeLists.txt index 489c0a4b8..41ef2c4f3 100644 --- a/samples/secure_tunneling/secure_tunnel/CMakeLists.txt +++ b/samples/secure_tunneling/secure_tunnel/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(secure-tunnel CXX) diff --git a/samples/secure_tunneling/tunnel_notification/CMakeLists.txt b/samples/secure_tunneling/tunnel_notification/CMakeLists.txt index fd25af565..69388d69e 100644 --- a/samples/secure_tunneling/tunnel_notification/CMakeLists.txt +++ b/samples/secure_tunneling/tunnel_notification/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(tunnel-notification CXX) diff --git a/samples/shadow/mqtt5_shadow_sync/CMakeLists.txt b/samples/shadow/mqtt5_shadow_sync/CMakeLists.txt index 34e17996f..3dc9c1f07 100644 --- a/samples/shadow/mqtt5_shadow_sync/CMakeLists.txt +++ b/samples/shadow/mqtt5_shadow_sync/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(mqtt5-shadow-sync CXX) diff --git a/samples/shadow/shadow_sync/CMakeLists.txt b/samples/shadow/shadow_sync/CMakeLists.txt index 45c4e76eb..cf2270af4 100644 --- a/samples/shadow/shadow_sync/CMakeLists.txt +++ b/samples/shadow/shadow_sync/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(shadow-sync CXX) diff --git a/secure_tunneling/CMakeLists.txt b/secure_tunneling/CMakeLists.txt index 224b767c6..3a5cb08e6 100644 --- a/secure_tunneling/CMakeLists.txt +++ b/secure_tunneling/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(IotSecureTunneling-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) diff --git a/secure_tunneling/tests/CMakeLists.txt b/secure_tunneling/tests/CMakeLists.txt index c4ddfecc6..de0cc2592 100644 --- a/secure_tunneling/tests/CMakeLists.txt +++ b/secure_tunneling/tests/CMakeLists.txt @@ -1,4 +1,3 @@ -cmake_minimum_required(VERSION 3.1) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(secure_tunnel_test CXX) diff --git a/servicetests/tests/FleetProvisioning/CMakeLists.txt b/servicetests/tests/FleetProvisioning/CMakeLists.txt index efcb43bdc..b6a778f9d 100644 --- a/servicetests/tests/FleetProvisioning/CMakeLists.txt +++ b/servicetests/tests/FleetProvisioning/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(fleet_provisioning CXX) diff --git a/servicetests/tests/JobsExecution/CMakeLists.txt b/servicetests/tests/JobsExecution/CMakeLists.txt index 70577d337..77dc0b6e1 100644 --- a/servicetests/tests/JobsExecution/CMakeLists.txt +++ b/servicetests/tests/JobsExecution/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(job-execution CXX) diff --git a/servicetests/tests/ShadowUpdate/CMakeLists.txt b/servicetests/tests/ShadowUpdate/CMakeLists.txt index 3e10518c6..567781ffe 100644 --- a/servicetests/tests/ShadowUpdate/CMakeLists.txt +++ b/servicetests/tests/ShadowUpdate/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) # note: cxx-17 requires cmake 3.8, cxx-20 requires cmake 3.12 project(shadow-update CXX) diff --git a/shadow/CMakeLists.txt b/shadow/CMakeLists.txt index 771a462a8..837c79fc2 100644 --- a/shadow/CMakeLists.txt +++ b/shadow/CMakeLists.txt @@ -1,6 +1,6 @@ # This file is generated -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.9) project(IotShadow-cpp LANGUAGES CXX) if (DEFINED SIMPLE_VERSION) From 879af80c26d7bd6e1d6d0d075b666513498d9dd0 Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Tue, 29 Oct 2024 11:00:46 -0700 Subject: [PATCH 3/4] Version stamp all subproject libraries (#757) * Version stamp all subproject libraries --------- Co-authored-by: Bret Ambrose --- devicedefender/CMakeLists.txt | 13 +++++++------ .../include/aws/iotdevicedefender/Config.h.in | 11 +++++++++++ discovery/CMakeLists.txt | 12 +++++++----- discovery/include/aws/discovery/Config.h.in | 11 +++++++++++ eventstream_rpc/CMakeLists.txt | 12 +++++++----- .../include/aws/eventstreamrpc/Config.h.in | 11 +++++++++++ greengrass_ipc/CMakeLists.txt | 12 +++++++----- greengrass_ipc/include/aws/greengrass/Config.h.in | 11 +++++++++++ identity/CMakeLists.txt | 12 +++++++----- identity/include/aws/iotidentity/Config.h.in | 11 +++++++++++ iotdevicecommon/CMakeLists.txt | 12 +++++++----- .../include/aws/iotdevicecommon/Config.h.in | 11 +++++++++++ jobs/CMakeLists.txt | 12 +++++++----- jobs/include/aws/iotjobs/Config.h.in | 11 +++++++++++ secure_tunneling/CMakeLists.txt | 12 +++++++----- .../include/aws/iotsecuretunneling/Config.h.in | 11 +++++++++++ shadow/CMakeLists.txt | 12 +++++++----- shadow/include/aws/iotshadow/Config.h.in | 11 +++++++++++ 18 files changed, 162 insertions(+), 46 deletions(-) create mode 100644 devicedefender/include/aws/iotdevicedefender/Config.h.in create mode 100644 discovery/include/aws/discovery/Config.h.in create mode 100644 eventstream_rpc/include/aws/eventstreamrpc/Config.h.in create mode 100644 greengrass_ipc/include/aws/greengrass/Config.h.in create mode 100644 identity/include/aws/iotidentity/Config.h.in create mode 100644 iotdevicecommon/include/aws/iotdevicecommon/Config.h.in create mode 100644 jobs/include/aws/iotjobs/Config.h.in create mode 100644 secure_tunneling/include/aws/iotsecuretunneling/Config.h.in create mode 100644 shadow/include/aws/iotshadow/Config.h.in diff --git a/devicedefender/CMakeLists.txt b/devicedefender/CMakeLists.txt index 4104c6b3b..c53bd520d 100644 --- a/devicedefender/CMakeLists.txt +++ b/devicedefender/CMakeLists.txt @@ -1,11 +1,6 @@ cmake_minimum_required(VERSION 3.9) -project(IotDeviceDefender-cpp - LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("Device Defender version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(IotDeviceDefender-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -19,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotdevicedefender/Config.h") +configure_file(include/aws/iotdevicedefender/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -27,6 +27,7 @@ endif() file(GLOB AWS_IOTDEVICEDEFENDER_HEADERS "include/aws/iotdevicedefender/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_IOTDEVICEDEFENDER_SRC diff --git a/devicedefender/include/aws/iotdevicedefender/Config.h.in b/devicedefender/include/aws/iotdevicedefender/Config.h.in new file mode 100644 index 000000000..0c2801b27 --- /dev/null +++ b/devicedefender/include/aws/iotdevicedefender/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICEDEFENDER_GIT_HASH "@GIT_HASH@" diff --git a/discovery/CMakeLists.txt b/discovery/CMakeLists.txt index d592212ff..d3557c476 100644 --- a/discovery/CMakeLists.txt +++ b/discovery/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.9) -project(Discovery-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("Discovery version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(Discovery-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/discovery/Config.h") +configure_file(include/aws/discovery/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -26,6 +27,7 @@ endif() file(GLOB AWS_DISCOVERY_HEADERS "include/aws/discovery/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_DISCOVERY_SRC diff --git a/discovery/include/aws/discovery/Config.h.in b/discovery/include/aws/discovery/Config.h.in new file mode 100644 index 000000000..00b320f76 --- /dev/null +++ b/discovery/include/aws/discovery/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_DISCOVERY_GIT_HASH "@GIT_HASH@" diff --git a/eventstream_rpc/CMakeLists.txt b/eventstream_rpc/CMakeLists.txt index 9904496d3..193d4173b 100644 --- a/eventstream_rpc/CMakeLists.txt +++ b/eventstream_rpc/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.9) -project(EventstreamRpc-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("EventStreamRPC version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(EventstreamRpc-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/eventstreamrpc/Config.h") +configure_file(include/aws/eventstreamrpc/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -26,6 +27,7 @@ endif() file(GLOB AWS_EVENTSTREAMRPC_HEADERS "include/aws/eventstreamrpc/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_EVENTSTREAMRPC_SRC diff --git a/eventstream_rpc/include/aws/eventstreamrpc/Config.h.in b/eventstream_rpc/include/aws/eventstreamrpc/Config.h.in new file mode 100644 index 000000000..3a5b25844 --- /dev/null +++ b/eventstream_rpc/include/aws/eventstreamrpc/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_EVENTSTREAMRPC_GIT_HASH "@GIT_HASH@" diff --git a/greengrass_ipc/CMakeLists.txt b/greengrass_ipc/CMakeLists.txt index 911650ec9..890c8c188 100644 --- a/greengrass_ipc/CMakeLists.txt +++ b/greengrass_ipc/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.9) -project(GreengrassIpc-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("GreengrassIpc version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(GreengrassIpc-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/greengrass/Config.h") +configure_file(include/aws/greengrass/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -26,6 +27,7 @@ endif() file(GLOB AWS_GREENGRASSIPC_HEADERS "include/aws/greengrass/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_GREENGRASSIPC_SRC diff --git a/greengrass_ipc/include/aws/greengrass/Config.h.in b/greengrass_ipc/include/aws/greengrass/Config.h.in new file mode 100644 index 000000000..9518e0364 --- /dev/null +++ b/greengrass_ipc/include/aws/greengrass/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_GREENGRASS_GIT_HASH "@GIT_HASH@" diff --git a/identity/CMakeLists.txt b/identity/CMakeLists.txt index 6a29bfaaf..09ea945a5 100644 --- a/identity/CMakeLists.txt +++ b/identity/CMakeLists.txt @@ -2,11 +2,7 @@ cmake_minimum_required(VERSION 3.9) -project(IotIdentity-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("IotIdentity version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(IotIdentity-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -20,6 +16,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotidentity/Config.h") +configure_file(include/aws/iotidentity/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -28,6 +29,7 @@ endif() file(GLOB AWS_IOTIDENTITY_HEADERS "include/aws/iotidentity/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_IOTIDENTITY_SRC diff --git a/identity/include/aws/iotidentity/Config.h.in b/identity/include/aws/iotidentity/Config.h.in new file mode 100644 index 000000000..b3f4cfb13 --- /dev/null +++ b/identity/include/aws/iotidentity/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTIDENTITY_GIT_HASH "@GIT_HASH@" diff --git a/iotdevicecommon/CMakeLists.txt b/iotdevicecommon/CMakeLists.txt index a4fb4e0fc..9ab28e8b0 100644 --- a/iotdevicecommon/CMakeLists.txt +++ b/iotdevicecommon/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.9) -project(IotDeviceCommon-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("IoT Device Common version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(IotDeviceCommon-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotdevicecommon/Config.h") +configure_file(include/aws/iotdevicecommon/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -26,6 +27,7 @@ endif() file(GLOB AWS_IOTDEVICECOMMON_HEADERS "include/aws/iotdevicecommon/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_IOTDEVICECOMMON_SRC diff --git a/iotdevicecommon/include/aws/iotdevicecommon/Config.h.in b/iotdevicecommon/include/aws/iotdevicecommon/Config.h.in new file mode 100644 index 000000000..7b9827ba5 --- /dev/null +++ b/iotdevicecommon/include/aws/iotdevicecommon/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTDEVICECOMMON_GIT_HASH "@GIT_HASH@" diff --git a/jobs/CMakeLists.txt b/jobs/CMakeLists.txt index 79b62ea0e..5f436f8ec 100644 --- a/jobs/CMakeLists.txt +++ b/jobs/CMakeLists.txt @@ -2,11 +2,7 @@ cmake_minimum_required(VERSION 3.9) -project(IotJobs-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("IotJobs version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(IotJobs-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -20,6 +16,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotjobs/Config.h") +configure_file(include/aws/iotjobs/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -28,6 +29,7 @@ endif() file(GLOB AWS_IOTJOBS_HEADERS "include/aws/iotjobs/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_IOTJOBS_SRC diff --git a/jobs/include/aws/iotjobs/Config.h.in b/jobs/include/aws/iotjobs/Config.h.in new file mode 100644 index 000000000..747f13316 --- /dev/null +++ b/jobs/include/aws/iotjobs/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTJOBS_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTJOBS_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTJOBS_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTJOBS_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTJOBS_GIT_HASH "@GIT_HASH@" diff --git a/secure_tunneling/CMakeLists.txt b/secure_tunneling/CMakeLists.txt index 3a5cb08e6..5b15026b6 100644 --- a/secure_tunneling/CMakeLists.txt +++ b/secure_tunneling/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required(VERSION 3.9) -project(IotSecureTunneling-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("Secure Tunneling version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(IotSecureTunneling-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -18,6 +14,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotsecuretunneling/Config.h") +configure_file(include/aws/iotsecuretunneling/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -26,6 +27,7 @@ endif() file(GLOB AWS_IOTSECURETUNNELING_HEADERS "include/aws/iotsecuretunneling/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_IOTSECURETUNNELING_SRC diff --git a/secure_tunneling/include/aws/iotsecuretunneling/Config.h.in b/secure_tunneling/include/aws/iotsecuretunneling/Config.h.in new file mode 100644 index 000000000..d11e602bc --- /dev/null +++ b/secure_tunneling/include/aws/iotsecuretunneling/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSECURETUNNELING_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSECURETUNNELING_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSECURETUNNELING_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSECURETUNNELING_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSECURETUNNELING_GIT_HASH "@GIT_HASH@" diff --git a/shadow/CMakeLists.txt b/shadow/CMakeLists.txt index 837c79fc2..1f717b8c5 100644 --- a/shadow/CMakeLists.txt +++ b/shadow/CMakeLists.txt @@ -2,11 +2,7 @@ cmake_minimum_required(VERSION 3.9) -project(IotShadow-cpp LANGUAGES CXX) -if (DEFINED SIMPLE_VERSION) - message("IotShadow version is ${SIMPLE_VERSION}") - set(PROJECT_VERSION ${SIMPLE_VERSION}) -endif() +project(IotShadow-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) set(RUNTIME_DIRECTORY bin) @@ -20,6 +16,11 @@ elseif(NOT DEFINED CMAKE_INSTALL_LIBDIR) endif() endif() +set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") +set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotshadow/Config.h") +configure_file(include/aws/iotshadow/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_PREFIX_PATH}/${CMAKE_INSTALL_LIBDIR}/cmake") if (NOT CMAKE_CXX_STANDARD) @@ -28,6 +29,7 @@ endif() file(GLOB AWS_IOTSHADOW_HEADERS "include/aws/iotshadow/*.h" + ${GENERATED_CONFIG_HEADER} ) file(GLOB AWS_IOTSHADOW_SRC diff --git a/shadow/include/aws/iotshadow/Config.h.in b/shadow/include/aws/iotshadow/Config.h.in new file mode 100644 index 000000000..66d133a2c --- /dev/null +++ b/shadow/include/aws/iotshadow/Config.h.in @@ -0,0 +1,11 @@ +#pragma once +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSHADOW_VERSION "@FULL_VERSION@" +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSHADOW_VERSION_MAJOR @PROJECT_VERSION_MAJOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSHADOW_VERSION_MINOR @PROJECT_VERSION_MINOR@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSHADOW_VERSION_PATCH @PROJECT_VERSION_PATCH@ +#define AWS_IOT_DEVICE_SDK_CPP_V2_IOTSHADOW_GIT_HASH "@GIT_HASH@" From 602121d76832e302472bfbbffb77b75d107ff647 Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Tue, 29 Oct 2024 11:07:49 -0700 Subject: [PATCH 4/4] [v1.34.0] Version stamping (#758) Co-authored-by: GitHub Actions --- README.md | 2 +- VERSION | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d85047010..9dbe8d5ec 100644 --- a/README.md +++ b/README.md @@ -140,4 +140,4 @@ is provided by code that been generated from a model of the service. This library is licensed under the [Apache 2.0 License](./documents/LICENSE). -Latest released version: v1.33.0 +Latest released version: v1.34.0 diff --git a/VERSION b/VERSION index 7aa332e41..2b17ffd50 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.33.0 +1.34.0