Skip to content

[CMake] Use CMAKE_CURRENT_SOURCE_DIR as base for includes in SwiftCompilerSources #60361

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
Aug 3, 2022

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 2, 2022

When using a unified LLVM + Swift build (using LLVM_EXTERNAL_PROJECTS=swift),
CMAKE_SOURCE_DIR is llvm-project/llvm, and appending include/swift to that directory doesn’t result in the directory that contains Swift’s header files.

Instead, look up the header files relative to CMAKE_CURRENT_SOURCE_DIR.

…pilerSources

When using a unified LLVM + Swift build (using `LLVM_EXTERNAL_PROJECTS=swift`),
`CMAKE_SOURCE_DIR` is `llvm-project/llvm`, and appending `include/swift` to that directory doesn’t result in the directory that contains Swift’s header files.

Instead, look up the header files relative to `CMAKE_CURRENT_SOURCE_DIR`.
@ahoppen ahoppen requested a review from eeckstein August 2, 2022 20:10
@ahoppen
Copy link
Member Author

ahoppen commented Aug 2, 2022

@swift-ci Please smoke test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm

@ahoppen ahoppen merged commit f10e66e into swiftlang:main Aug 3, 2022
@ahoppen ahoppen deleted the pr/more-relative-cmake-paths branch August 3, 2022 06:50
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