Skip to content

[CMake] Check if a cmake variable 'SWIFT_INSTALL_EXCLUDE_[component]' is set for a component #5967

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
Nov 29, 2016

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Nov 28, 2016

Check if a cmake variable 'SWIFT_INSTALL_EXCLUDE_[component]' is set for a component.
In which case the 'SWIFT_INSTALL_[component]' will be FALSE.

This is useful to get the behavior where all components are set to install by default and exclude just a specific one.

… is set for a component.

In which case the 'SWIFT_INSTALL_[component]' will be FALSE.
This is useful to get the behavior where all components are set to install by default and exclude just a specific one.
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Nov 28, 2016

@swift-ci smoke test and merge

@akyrtzi
Copy link
Contributor Author

akyrtzi commented Nov 28, 2016

@swift-ci smoke test OS X platform

@akyrtzi akyrtzi merged commit 386b4b4 into swiftlang:master Nov 29, 2016
@akyrtzi akyrtzi deleted the cmake-opt-swift-install-exclude branch November 29, 2016 00:17
@@ -85,7 +85,12 @@ macro(swift_configure_components)

string(TOUPPER "${component}" var_name_piece)
string(REPLACE "-" "_" var_name_piece "${var_name_piece}")
set(SWIFT_INSTALL_${var_name_piece} TRUE)
if("${SWIFT_INSTALL_EXCLUDE_${var_name_piece}}" STREQUAL "")
Copy link
Contributor

Choose a reason for hiding this comment

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

This first part should be unneccessary; CMake already treats unset or empty variables as false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, see #5985

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.

2 participants