-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake <3.12 fails on Windows with 'Object library target "libcurl_object" may not link to anything.' error #16375
Comments
Thanks for you report and finding the cutoff CMake version. The oldest CI tested with Windows is 3.16.2. For Linux it's 3.7. Does |
This feature requires Object Libraries which is supported by CMake 3.12 and newer: https://cmake.org/cmake/help/latest/release/3.12.html Ignore this option for older CMake versions. Ref: https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#object-libraries Reported-by: markp-iot on Github Fixes curl#16375
This feature requires Object Libraries which is supported by CMake 3.12 and newer: https://cmake.org/cmake/help/latest/release/3.12.html Ignore this option for older CMake versions. Ref: https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#object-libraries Reported-by: markp-iot on Github Fixes curl#16375
This feature requires Object Libraries which is supported by CMake 3.12 and newer: https://cmake.org/cmake/help/latest/release/3.12.html Ignore this option for older CMake versions. Ref: https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#object-libraries Reported-by: markp-iot on Github Fixes curl#16375
Viktor, many thanks for the quick response. I tried
I also checked out your changes and re-ran with the same old version of CMake but without Thanks again for your help in resolving this. |
@mark-phillips-ibm Thanks for your tests and feedback! I'm glad it works. Do you have a preference which user ID (or name) to include for you in the |
HI Viktor, you're welcome - I don't really mind - either id or just my name - Mark Phillips is fine. Thanks again! |
Thanks Mark, the fix is merged now. |
I did this
With the deprecation of winbuild I'm trying to build on Windows using cmake.
I'm using a back level VS 2017 :
which includes cmake 3.10, and I'm hitting an error :
This fails for CMake 3.10.3, and 3.11.4, but it works for CMake 3.12.0 and later.
I am running commands:
But this also fails for a 64 bit make (omitting the -A Win32).
The output from a failing (3.11.4) cmake command is :
The error files are attached.
The output from a successful (3.12.0) cmake command is :
CMakeOutput.log
CMakeError.log
I expected the following
CMakeLists.txt says
...so I expected CMake to succeed on CMake 3.10 and 3.11
Is target_link_libraries() depending on a feature which is only available in CMake 3.12 and later?
curl/libcurl version
curl 8.12.1
operating system
Windows 10 Professional
** Visual Studio 2017 Developer Command Prompt v15.6.4
CMake < 3.12
The text was updated successfully, but these errors were encountered: