Skip to content

[Build System: CMake] Always copy the apinotes into the build directory when the apinotes directory is included via SWIFT_INCLUDE_APINOTES. #24527

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
May 6, 2019

Conversation

Rostepher
Copy link
Contributor

Follow-up to #24419, we should add the copy_apinotes target to the default build target.

…ry when the apinotes directory is included via SWIFT_INCLUDE_APINOTES.
@Rostepher Rostepher requested review from compnerd and gottesmm May 6, 2019 19:05
@Rostepher
Copy link
Contributor Author

@swift-ci please test

@@ -23,7 +23,7 @@ add_custom_command(
COMMAND
"${CMAKE_COMMAND}" "-E" "copy_if_different" ${inputs} "${output_dir}/")

add_custom_target("copy_apinotes"
add_custom_target("copy_apinotes" ALL
DEPENDS "${outputs}" "${output_dir}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Question. Why are we adding add_custom_command here? Shouldn't we be using add_custom_command_target? That caused weird dependency issues for us before.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about the history of this file, I didn't write this copy logic myself. We just need this target to be added to the default build target if this directory is included. This is mostly for the standalone overlay builds.

I wasn't intending to drastically change the structure for this PR as I need it to unblock some other work, but I'd be happy to discuss a more comprehensive change in the future.

Copy link
Member

@compnerd compnerd May 6, 2019

Choose a reason for hiding this comment

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

This is only adding the target, not an associated command, so this is fine as is. I had a change that replaced this with a add_custom_command_target but would lose the ability to create the symlink (and instead always copy). I think that is generally better, but, I don't know if that will create a problem for Apple's distribution.

@Rostepher Rostepher merged commit c98f88e into swiftlang:master May 6, 2019
@Rostepher Rostepher deleted the always-copy-apinotes branch May 6, 2019 21:38
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.

3 participants