[PATCH] D111238: [Support][llvm] Add optional libCURL dependency to llvm build configuration

Noah Shutty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 10:12:22 PDT 2021


noajshu added inline comments.


================
Comment at: llvm/CMakeLists.txt:407
+  set(LLVM_WITH_CURL 1)
+  set(CURL_LIBRARY "-lcurl")
+  find_package(CURL 7.74.0 REQUIRED)
----------------
lebedev.ri wrote:
> This can't be right, shouldn't you be using `CURL_LIBRARIES` set by `find_package()`?
Thanks, I agree! L407 is needed to avoid the following error which arises if it is removed:
```
CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find CURL (missing: CURL_LIBRARY) (found suitable version
  "7.74.0", minimum required is "7.74.0")
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.18/Modules/FindCURL.cmake:169 (find_package_handle_standard_args)
  CMakeLists.txt:407 (find_package)


-- Configuring incomplete, errors occurred!
```
I tried a few workarounds but setting the `CURL_LIBRARY` was the simplest fix I found. Do you have any idea what might cause this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111238



More information about the llvm-commits mailing list