[PATCH] D114327: [CMake] Installable find modules for terminfo and libffi

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 29 09:28:39 PST 2021


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

I'm assuming the logic to find the actual packages is the same (I didn't check in detail). Splitting this into separate Find-modules is definitely the way to go and that part of this patch LGTM.



================
Comment at: llvm/cmake/modules/FindFFI.cmake:59
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(FFI DEFAULT_MSG FFI_LIBRARY_PATH ${required_includes} HAVE_FFI_CALL)
+mark_as_advanced(FFI_LIBRARY_PATH FFI_INCLUDE_PATH HAVE_FFI_CALL FFI_HEADER HAVE_FFI_H HAVE_FFI_FFI_H)
----------------
In LLDB we format this call as shown below to help with readability:

```
  find_package_handle_standard_args(LibEdit
                                    FOUND_VAR
                                      LibEdit_FOUND
                                    REQUIRED_VARS
                                      LibEdit_INCLUDE_DIRS
                                      LibEdit_LIBRARIES
                                    VERSION_VAR
                                      LibEdit_VERSION_STRING)
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114327/new/

https://reviews.llvm.org/D114327



More information about the llvm-commits mailing list