-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix weird CMake issue with custom LLVM #6519
Fix weird CMake issue with custom LLVM #6519
Conversation
Without this, cmake fails with: ``` CMake Error in dependencies/llvm/CMakeLists.txt: Target "Halide_LLVM" INTERFACE_INCLUDE_DIRECTORIES property contains path: "/repositories/halide/dependencies/llvm/" which is prefixed in the source directory. ``` `LLVM_INCLUDE_DIRS` there is `/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include`, and `INTERFACE_INCLUDE_DIRECTORIES`'s property beforehand is `` (empty), but after this line it suddenly becomes `/repositories/halide/dependencies/llvm/$<BUILD_INTERFACE:/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include>`. This is quite obscure. I don't really understand what is going on, but with the patch it builds fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I hate CMake's quoting rules...
Note: i really do not understand why quotes are needed here... |
Because it turns it into two arguments...
and
And because CMake is inconsistent in how it treats this. |
Failures are unrelated. Tagging @steven-johnson for the llvm-14 fix. |
Looks like the CI broke a week ago - https://buildbot.halide-lang.org/master/#/builders/173/builds/499 vs https://buildbot.halide-lang.org/master/#/builders/173/builds/500 cc @labrinea
|
|
I opened an issue with LLVM here: llvm/llvm-project#52919 |
@alexreinking thank you! |
Without this, cmake fails with: ``` CMake Error in dependencies/llvm/CMakeLists.txt: Target "Halide_LLVM" INTERFACE_INCLUDE_DIRECTORIES property contains path: "/repositories/halide/dependencies/llvm/" which is prefixed in the source directory. ``` `LLVM_INCLUDE_DIRS` there is `/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include`, and `INTERFACE_INCLUDE_DIRECTORIES`'s property beforehand is `` (empty), but after this line it suddenly becomes `/repositories/halide/dependencies/llvm/$<BUILD_INTERFACE:/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include>`. This is quite obscure. I don't really understand what is going on, but with the patch it builds fine. (cherry picked from commit 9a530b1)
Without this, cmake fails with: ``` CMake Error in dependencies/llvm/CMakeLists.txt: Target "Halide_LLVM" INTERFACE_INCLUDE_DIRECTORIES property contains path: "/repositories/halide/dependencies/llvm/" which is prefixed in the source directory. ``` `LLVM_INCLUDE_DIRS` there is `/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include`, and `INTERFACE_INCLUDE_DIRECTORIES`'s property beforehand is `` (empty), but after this line it suddenly becomes `/repositories/halide/dependencies/llvm/$<BUILD_INTERFACE:/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include>`. This is quite obscure. I don't really understand what is going on, but with the patch it builds fine. (cherry picked from commit 9a530b1)
Without this, cmake fails with:
LLVM_INCLUDE_DIRS
there is/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include
,and
INTERFACE_INCLUDE_DIRECTORIES
's property beforehand is `` (empty),but after this line it suddenly becomes
/repositories/halide/dependencies/llvm/$<BUILD_INTERFACE:/repositories/llvm-project/llvm/include;/builddirs/llvm-project/build-Clang13/include>
.This is quite obscure. I don't really understand what is going on,
but with the patch it builds fine.