-
Notifications
You must be signed in to change notification settings - Fork 634
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
Create a CMake macro for defining aliases for configuration parameters #1596
Conversation
@@ -42,9 +42,9 @@ set_macro_definitions(TARGETS ${DEMO_NAME} | |||
"ROOT_CA_CERT_PATH" | |||
"CLIENT_CERT_PATH" | |||
"CLIENT_PRIVATE_KEY_PATH" | |||
"CLIENT_IDENTIFIER" | |||
"THING_NAME" |
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.
As part of best practices for connection with IoT Core, the Client ID should be the same as the Thing Name.
So, should we make the CLIENT_IDENTIFIER
as the required config but THING_NAME
as the optional config?
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.
Required in the context of this function means that a definition is required for it to compile without error. In that case, I think both of these macros should be required. In fact, nothing in the defender demo should be optional.
I've updated the docstring of set_macro_definitions
to specify this.
The
|
Perhaps, it would be best practice to set |
Co-authored-by: Archit Aggarwal <architag@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
This change allows aliases to be defined for macros by defining a macro called
set_alias
.This is done to fix issue #1583, allowing
THING_NAME
to be an alias forCLIENT_IDENTIFIER
.It also fixes issue #1584 so that the values of any parameters or the file from which they are retrieved are logged. Here's an example of the log output:
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.