A report on llvm-dev indicated that curl.h could be found during build configuration but not during compilation. This diff uses the libcurl imported library created by findcurl, so that includes and libs are automatically managed correctly by cmake.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Rebase against main after landing D115131.
Now I am seeing this:
CMake Warning (dev) in CMakeLists.txt: Policy CMP0111 is not set: An imported target missing its location property fails during generation. Run "cmake --help-policy CMP0111" for policy details. Use the cmake_policy command to set the policy and suppress this warning. IMPORTED_LOCATION not set for imported target "CURL::libcurl" configuration "Debug". This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) in CMakeLists.txt: Policy CMP0111 is not set: An imported target missing its location property fails during generation. Run "cmake --help-policy CMP0111" for policy details. Use the cmake_policy command to set the policy and suppress this warning. IMPORTED_LOCATION not set for imported target "CURL::libcurl" configuration "Debug". This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning (dev) in CMakeLists.txt: Policy CMP0111 is not set: An imported target missing its location property fails during generation. Run "cmake --help-policy CMP0111" for policy details. Use the cmake_policy command to set the policy and suppress this warning. IMPORTED_LOCATION not set for imported target "CURL::libcurl" configuration "Debug". This warning is for project developers. Use -Wno-dev to suppress it.
And then when I try to build, I get:
ninja: Entering directory `build' ninja: error: 'CURL::libcurl-NOTFOUND', needed by 'unittests/Debuginfod/DebuginfodTests', missing and no known rule to make it
Comment Actions
This means that cURL wasn't found so LLVM_ENABLE_CURL should evaluate to false, but in your case it appears to be evaluating to true. I'd check https://github.com/llvm/llvm-project/blob/b206ee69061120d559d8315bede6c63758b06154/llvm/cmake/config-ix.cmake#L180.
You need to use the imported library here instead which configures both the include directory and the library. See zlib case above where we do the same.