Skip to content
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

Add cmake flag for iot creds #2056

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Add cmake flag for iot creds #2056

merged 2 commits into from
Sep 18, 2024

Conversation

sirknightj
Copy link
Contributor

@sirknightj sirknightj commented Sep 18, 2024

Issue #, if available:
N/A

What was changed?
Add a CMake flag that defines the pre-processor macro: IOT_CORE_ENABLE_CREDENTIALS. This flag is used in the samples to enable IoT credentials. Otherwise, static credentials (AK, SK, (ST)) are used.

Why was it changed?

  • Makes it easier to build. Previously, you would need to uncomment a line in the samples to enable using IoT credentials in the samples.

How was it changed?

  • If "-DIOT_CORE_ENABLE_CREDENTIALS=ON" cmake flag is present, it will add the pre-processor macro: IOT_CORE_ENABLE_CREDENTIALS. Also add a log line to indicate that it chose this path. To maintain backwards compatibility, this flag is OFF by default.

What testing was done for the changes?

  1. cmake .., run kvsWebrtcClientMaster
    • IoT credentials are not used.
  2. cmake .. -DIOT_CORE_ENABLE_CREDENTIALS=OFF, run kvsWebrtcClientMaster
    • IoT credentials still not used.
  3. cmake .. -DIOT_CORE_ENABLE_CREDENTIALS=ON, run kvsWebrtcClientMaster
    • IoT credentials are used.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

samples/Samples.h Outdated Show resolved Hide resolved
Copy link
Contributor

@hassanctech hassanctech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sirknightj sirknightj merged commit 096cafe into 1.10.3 Sep 18, 2024
@sirknightj sirknightj deleted the cmake-flag-for-iot-creds branch September 18, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants