Skip to content

Conversation

bulbazord
Copy link
Contributor

CMake supports the notion of installation components. Right now we have some
custom code for supporting swift components. I think that for installation
purposes, it would be nice to use the CMake component system.

This should be a non-functional change. We should still only be generating
install rules for targets and files in components we want to install, and we
still use the install ninja target to install everything.

I originally made this change and more to simplify the build system. I've decided to break up that change into smaller pieces so that it is easier to reason about and review. This is the first part of that change. The original change is here: #24137

cc @compnerd @gottesmm @Rostepher

…mponents

CMake supports the notion of installation components. Right now we have some
custom code for supporting swift components. I think that for installation
purposes, it would be nice to use the CMake component system.

This should be a non-functional change. We should still only be generating
install rules for targets and files in components we want to install, and we
still use the install ninja target to install everything.
"" # options
"COMPONENT" # single-value args
"" # multi-value args
${ARGN})
Copy link
Member

Choose a reason for hiding this comment

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

Usually this is nicer with variables for the individual options rather than comments, but, this should be short lived, so meh.

@compnerd
Copy link
Member

This is NFC.

@compnerd
Copy link
Member

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3d9a289

@compnerd
Copy link
Member

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3d9a289

@compnerd
Copy link
Member

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3d9a289

@compnerd
Copy link
Member

@swift-ci please test macOS platform

@bulbazord
Copy link
Contributor Author

@Rostepher Mind taking a quick look at this when you have the chance?

@bulbazord
Copy link
Contributor Author

@Rostepher @gottesmm friendly ping

#
# Executes the specified installation actions if the named component is
# requested to be installed.
#
# This function accepts the same parameters as install().
function(swift_install_in_component component)
precondition(component MESSAGE "Component name is required")
function(swift_install_in_component)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the only big change here passing in COMPONENT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's the only big change in this PR.

@gottesmm
Copy link
Contributor

LGTM

@gottesmm
Copy link
Contributor

@xiaobai next time put that into the commit msg. It will make it easier to review.

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.

4 participants