Skip to content

[SourceKit] Register optional sources in CMake #2467

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 11, 2016

Conversation

modocache
Copy link
Contributor

@modocache modocache commented May 10, 2016

What's in this pull request?

LLVM's CMake modules include a function llvm_process_sources(), which (among other things) verifies that all source files in a directory are either included in the list of source files to process, or are included in a list LLVM_OPTIONAL_SOURCES.

SourceKit's CMake functions make use of this LLVM function, but do not register any files as "optional". When attempting to configure CMake to include SourceKit on a Linux host machine, source files that are only included on Darwin host machines cause this function to raise an error.

Mark Darwin-only SourceKit files as "optional" to avoid the error.

Resolved Related bug number: (SR-710)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

LLVM's CMake modules include a function `llvm_process_sources()`,
which (among other things) verifies that all source files in a
directory are either included in the list of source files to process,
or are included in a list `LLVM_OPTIONAL_SOURCES`.

SourceKit's CMake functions make use of this LLVM function, but do
not register any files as "optional". When attempting to configure
CMake to include SourceKit on a Linux host machine, source files
that are only included on Darwin host machines cause this function
to raise an error.

Mark Darwin-only SourceKit files as "optional" to avoid the error.
@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@gribozavr
Copy link
Contributor

CI failure is unrelated.

@gribozavr gribozavr merged commit 60a594f into swiftlang:master May 11, 2016
@modocache modocache deleted the sourcekit-linux-cmake branch May 11, 2016 08:41
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