Skip to content

[Build System: CMake] Add CMake module paths before importing in StandaloneOverlay.cmake #24706

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 13, 2019

Conversation

Rostepher
Copy link
Contributor

No description provided.

@Rostepher
Copy link
Contributor Author

@swift-ci please smoke test

@@ -9,6 +9,12 @@ if(DEFINED SWIFT_MASTER_LOADED
endif()


list(APPEND CMAKE_MODULE_PATH
"${SWIFT_SOURCE_ROOT}/llvm/cmake/modules"
Copy link
Member

Choose a reason for hiding this comment

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

There is no guarantee that SWIFT_SOURCE_ROOT is defined. I think it might be better to rely on the standard behaviour of CMake:

find_package(LLVM CONFIG REQUIRED)

That will error out if the user does not specify LLVM_DIR or does not have LLVM installed and available on the system.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In all cases where this module is currently used it should be safe to assume that SWIFT_SOURCE_ROOT is defined. I hope to remove the need for this extra system in the near future (should it be possible) then we won't have to worry about this odd inconsistency.

@Rostepher Rostepher merged commit e72242a into swiftlang:master May 13, 2019
@Rostepher Rostepher deleted the fix-cmake-import branch May 13, 2019 22:01
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