This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Add missing find_package for LibEdit
ClosedPublic

Authored by ekilmer on Mar 29 2023, 6:52 AM.

Details

Summary

After building and installing LLVM with LibEdit as a dependency, it is
necessary to find it again when LLVM is consumed by another CMake
project, otherwise CMake will report an error about a missing target.

Note that the FindLibEdit.cmake file is in the "LLVM Common CMake
Utils" directory, outside of the LLVM sub-project source directory, so
the installed LLVMConfig.cmake relies on the user having installed the
LLVM common CMake modules or make available their own Find module.

Also note that the controlling HAVE_LIBEDIT CMake variable in
LLVMConfig.cmake.in has a different naming convention compared to
other similar variables like 'LLVM_ENABLE_TERMINFO'. Refactoring this
name would involve touching additional files and should be a follow-up
commit.

Diff Detail

Event Timeline

ekilmer created this revision.Mar 29 2023, 6:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 6:52 AM
ekilmer published this revision for review.Mar 29 2023, 7:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 7:55 AM
ekilmer updated this revision to Diff 509674.Mar 30 2023, 7:30 AM

Rebase on 'main'. Trying to fix build

phosek accepted this revision.Mar 31 2023, 12:06 AM

LGTM

This revision is now accepted and ready to land.Mar 31 2023, 12:06 AM

Thank you for the review @phosek!

I don't believe I have the ability to commit this change, as this is my first contribution to LLVM. Any help in committing this would be appreciated. Thank you.

Ping @phosek. Is there anything else that needs to be done on my end before landing this on main branch?

Ping. How do I get this committed to main branch?

This revision was automatically updated to reflect the committed changes.

Ping. How do I get this committed to main branch?

I have landed the change in rG7d89e6c1c0a01c959beddab643e39d2bc4c2c97d.