-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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_minimum_required() uses "...", which is a feature available in 3.12 onward leading to broken configuration #9237
Comments
Just as a test I removed the |
From the link you've posted:
|
I second @jzakrzewski on this: the cmake documentation quite clearly says that this syntax works in older versions too. |
Did you guys try the CMake shipped with Visual Studio? Please note that VS ships its own version, which (at least up to 2017 included) is impossible to be replaced by another one. I will check with a standard installation of CMake (have that too) and hopefully it will work (as you have said). |
It's not CMake that throws errors but VS 2017 itself trying to analyse the version string. |
This is clearly not our bug and not even a cmake bug, but a problem with Visual Studio. You also seem to have found an easy and simple work-around to get this working for you. I do not think there's any action left for us to do here. |
I did this
Added curl as a submodule to my project to use as a dependency. No changes have been done to the contents of the
master
branch.Using Visual Studio 2017 I ran (from the CMake menu) the cache generation.
I expected the following
Properly configured curl as a dependency.
Instead I received an error regarding the version and that it is either too short or too long. I checked
CMakeLists.txt
and foundcmake_minimum_required(VERSION 3.2...3.16 FATAL_ERROR)
. Based on the official CMake documentation the use of...
to specify a policy range (in this case between 3.2 and 3.16) this feature has been introduced in 3.12.Solution
Either remove the
...
and check ifcurl
can actually still be configured with as low as CMake 3.2 or increase the minimum to 3.12. Note that at least on my machine VS2017 is shipped with 3.11. Older versions of VS will have even bigger issues and upgrading CMake that is shipped as an extension for the IDE is non-existent and one needs to wait for the VS team at Microsoft to ship one.curl/libcurl version
Latest from master branch.
operating system
Windows 10 Pro 64bit
The text was updated successfully, but these errors were encountered: