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

fix: don't use DEPENDS with add_custom_command(TARGET) #5074

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

kou
Copy link
Contributor

@kou kou commented Jan 31, 2025

Release Summary:

Resolved issues:

resolves #5073

Description of changes:

We can use DEPENDS for add_custom_command(OUTPUT) but can't use DEPENDS for add_custom_command(TARGET).

See also the add_custom_command(TARGET) document:
https://cmake.org/cmake/help/latest/command/add_custom_command.html#build-events

If we use DEPENDS for add_custom_command(TARGET), the following warning is reported:

The following keywords are not supported when using
add_custom_command(TARGET): DEPENDS.

We can just remove DEPENDS to suppress the warning.

Call-outs:

Address any potentially confusing code. Is there code added that needs to be cleaned up later? Is there code that is missing because it’s still in development? If a callout is specific to a section of code, it might make more sense to leave a comment on your own PR file diff.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? What manual testing was performed? Are there any testing steps to be verified by the reviewer?

cmake -DS2N_INTERN_LIBCRYPTO=ON doesn't report the warning with this.

How can you convince your reviewers that this PR is safe and effective?

This just removes the warned and ignored argument.

Is this a refactor change? If so, how have you proved that the intended behavior hasn't changed?

No.

Remember:

  • Any change to the library source code should at least include unit tests.
  • Any change to the core stuffer or blob methods should include CBMC proofs.
  • Any change to the CI or tests should:
    1. prove that the test succeeds for good input
    2. prove that the test fails for bad input (eg, a test for memory leaks fails when a memory leak is committed)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

We can use DEPENDS for add_custom_command(OUTPUT) but can't use
DEPENDS for add_custom_command(TARGET).

See also the add_custom_command(TARGET) document:
https://cmake.org/cmake/help/latest/command/add_custom_command.html#build-events

If we use DEPENDS for add_custom_command(TARGET), the following
warning is reported:

    The following keywords are not supported when using
    add_custom_command(TARGET): DEPENDS.
Copy link
Contributor

@goatgoose goatgoose left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@goatgoose goatgoose requested a review from jmayclin February 4, 2025 16:49
@goatgoose goatgoose added this pull request to the merge queue Feb 6, 2025
Merged via the queue into aws:main with commit d5d9b32 Feb 6, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add_custom_command(TARGET) uses unsupported DEPENDS keyword
3 participants