This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Refining the IR/CMakeLists.txt (followup to D136477)
ClosedPublic

Authored by wrengr on Oct 21 2022, 3:01 PM.

Diff Detail

Event Timeline

wrengr created this revision.Oct 21 2022, 3:01 PM
wrengr requested review of this revision.Oct 21 2022, 3:01 PM
aartbik accepted this revision.Oct 21 2022, 3:16 PM
This revision is now accepted and ready to land.Oct 21 2022, 3:16 PM
This revision was landed with ongoing or failed builds.Oct 21 2022, 3:24 PM
This revision was automatically updated to reflect the committed changes.

Not sure if target_sources can be inside the for loop (i.e. does target_sources append to MLIRSparseTensorEnums, or does it rewrite it?). Did you check if it works if you have multiple headers?

Not sure if target_sources can be inside the for loop (i.e. does target_sources append to MLIRSparseTensorEnums, or does it rewrite it?). Did you check if it works if you have multiple headers?

Per https://cmake.org/cmake/help/latest/command/target_sources.html: "Repeated calls for the same <target> append items in the order called."

It works as written for building things within llvm-project, though I don't have an external project set up for verifying that it works there too.

joshchngs added a subscriber: joshchngs.

It works as written for building things within llvm-project, though I don't have an external project set up for verifying that it works there too.

I can confirm it doesn't work for my external project. I think because the INSTALL_INTERFACE generator needs to account for the include tree being separate from the lib source.
Added you as a review on the fix, @wrengr - https://reviews.llvm.org/D136649