-
Notifications
You must be signed in to change notification settings - Fork 16
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
[tools] CMake 3.15 required #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good. I think I would add a few lines for summary and voting process in the PR comment
Co-authored-by: James <james@conan.io>
before I vote, I wonder why 3.15, what are the features that have been added with 3.15 |
The relevant features for Conan are described in the proposal document: https://github.com/conan-io/tribe/pull/4/files. They are based on what Conan needs to operate consistently and implement its logic (toolchains, generators), not on generic CMake features. |
I usually support using the newer versions of tools wherever possible however, I am wondering what the motivation is here for a release that is only just over a year old. We currently use a much older version of CMake, we could likely upgrade to be compatible with conan 2.0 but I would like to know the motivation for selecting this version for conan 2.0. Is it simply to make the test matrix for conan smaller (ie. you need to maintain compatibility with much fewer versions of CMake, making testing easier) or are there some critical features introduced in newer versions of CMake that you plan to use and integrate with, and if so, what are they? |
Hi @Daniel-Roberts-Bose Please read https://github.com/conan-io/tribe/pull/4/files. In short:
There are a couple of other things that requires at least CMake 3.14, and we have hacks in the Conan codebase, like correctly defining CMAKE_SYSTEM_NAME under Apple for iOS, watchOS... |
I would amend the change with a requirement that every cmake script must check the cmake version: cmake_minimum_required(VERSION 3.15) Would it be useful to document the behaviour of the cmake generators + cmake build helpers documented such that somebody can create a |
For the category of "minimum supported version of X" I'd suggest that Conan also put together a list of officially supported platforms, to include the major OS releases. Then I'd suggest enumerating the current version of the tool that's provided (or very easily obtainable) for that platform.
Not every OS supports an easy way to update to current tools, so it's important to know which supported platforms are lacking and what (non-controversial) methods are available for installing the toolchain. |
I do not agree. I could not find any survey showing us % of users using at least 3.15. IMHO conan should support at least cmake 3.9.6 (3 years old) |
@jgsogo |
There is still no defined ETA for Conan 2.0, depends on the scope of some core features and changes (still to be discussed), but I would say that not earlier than June 2021.
I don't think we should try to optimize for the needs of possible future Conan users, and choosing versions based on time is not representative of real usage. The Conan community is large enough, and this is exactly the purpose of this Tribe: lets choose the latest possible version that satisfy the current Conan user base. This should be good as a proxy for other possible future Conan users needs. In that regard an important note: You should report what is the version support that you need, no need to design or to decide for others. You can be "selfish". The Tribe is big enough to be representative of real world constraints, if someone is constrained, lets say to CMake 3.9, because of reason X, they should report it and give that direct feedback here |
Are we planning to use the |
Vcpkg downloads its own cmake executable, curently 3.18.4. cmake is packaged in conan-center, so anyone who wanted could do the same with a |
No, we don't plan to force that as built-in, we think it is important to let users the possibility to define their own CMake, and not depend on ConanCenter if they don't want to (some might not even be able due to policies or other constraints). We think that users should be able to use their own system-installed CMake without problems. |
I agree 100% with "should be able to", and maybe about 50% with "should have to do it". It would be very nice if (particularly if conan-io/conan#7240 becomes a thing), to have a some explicit way for a But that's quite a different issue from "what's the minimum version", albeit if it existed it would be an easy way to deal with an environment whose system package is too old to meet said minimum. |
We just recently bumped cmake to 3.18.4. Some of our devs seems seems to have issues with upgrading cmake because we are still on vs2017 and it ships older cmake which seem to be a bit harder to bypass on the GUI side. I work 100% to shell so I don't know how much trouble this could be for general usage. |
actually using cmake 3.9.6 |
I have also experienced this kind of logistical hurdle among dev teams. The version of cmake that comes via apt-get in the standard Debian/Ubuntu channels is behind 3.15. To get a more recent version of cmake requires additional steps. Similarly, embedded toolchains (like from Yocto recipes) lag behind in cmake version. None of this is insurmountable - it's just a barrier to entry that may hamper adoption, particularly among large organizations with established tooling and lots of developers to keep happy. |
We filed https://developercommunity.visualstudio.com/idea/419081/add-option-to-vcvarsallbat-to-pick-and-choose-what.html a long time ago asking for a way in vcvarsall to avoid MS throwing other random tools (cmake, ninja, etc) into PATH when we were just asking for the VC compiler/Windows SDK/etc. We've actually written a This is of course also at root in issues like conan-io/conan#6577 |
You don't have to force users to depend on ConanCenter if you mandate using the cmake version provided as conan package. It can be simply a configuration entry in I know that some companies don't allow using packages from ConanCenter (mine included), but, at least in our case, we have a custom |
One thing I would really like to see is a the ability for profiles to do overrides for And I'd like profiles to be able to do overrides for |
We will be discussing the graph-model later, and it will probably be one of the biggest thing (it will need to be broken into multiple pieces for proposals and discussions) To clarify: we don't plan to remove the ability of users to use their own tools like CMake or Visual Studio, installed in their system in the way they like. We might provide other useful ways to install them, as with Conan packages, build_requires, or even new features, but removing the ability of users to provide their own tools directly themselves, is not under consideration. The current proposal applies mainly for this case, as for other cases as using build_requires, is not relevant. |
Looking for a clarification. What is the intent of the minimum supported version? Is it just the minimum version that CCI will use in testing? The minimum version for use in CCI recipes? Will people still be able to use older versions of CMake (assuming it meets the |
@dheater nothing to do with ConanCenter, but with Conan itself. The generators like
Users might not be able to use the new standard proposed integration with cmake (basically an improved |
voted 👍 as we're using 3.17 and it wouldn't be a problem but do agree with concern that not supporting CMake that comes with apt install in major Linux distros will be an unnecessary hurdle raising eyebrows |
We use a custom 12.2 version, because we support our own "TI CCS" Studio (adapted from the Visual Studio support), which is not in main line. |
Worth noting that Visual Studio ships a CMake version, so this and #5 are possibly bound together (not for everyone, but some people do end up not installing their own CMake, so they use whatever VS gives them). |
Hi Tribe, |
Apologies for my late feedback on this. If conan were to require a "recent" version of CMake (e.g such as 3.15) I believe that on most mainstream Linux distros and on windows, installing a recent version of cmake should be easy enough as to not be a big problem (e.g. for Ubuntu, Kitware maintains a repo that covers 16.04 onwards: https://apt.kitware.com/) However it's probably worth mentioning that on certain ARM-based platforms like the Raspberry Pi or NVIDIA Jetson, it's not as trivial and may require building it from source. Raspberry Pi is currently based on Debian buster (CMake 3.13.x) and the JetPack is based on Ubuntu 18.04 (CMake 3.10) - Unfortunately kitware doesn't provide ARM binaries for 18.04. I think one of the strengths of conan is the way it handles support for multiple platforms, so having to build cmake from source may increase the cost of entry. Perhaps for these platforms it is more common to cross-compile from an x86_64 system anyway (conan handles it easily and faster!) - but it's something worth noting. I suppose at some point next year both RPi and Jetson will be updated to more recent versions anyway |
Thanks for the late feedback @jcar87
Yes, we think so, that by the time Conan 2.0 is released, some distros might have updated CMake too. It is also worth noting that requiring CMake 3.15 might not be a complete blocker in all cases, and there might be workarounds for using other older versions, the closer to 3.15, the most likely there will be viable workarounds, of course. |
Having a CMake minimum requirement fixed is a good thing but still, it might not be enough. You have to leave a way to be able to bump this requirement when needed or be prepared to release Conan 3.0 soon. I might be wrong but I think that in the next few CMake releases we can expect a lot of changes addressing C++20 modules and I bet you want to support them with Conan too. |
It is not incompatible. Conan can request latest CMake to support some modern features, like C++modules, still support CMake 3.15 for all the other users that do not plan to adopt modules that fast (that will probably be a large part of the Conan users). It is not necessary a Conan 3.0 to support it, the proposal is about minimum versions, but of course versions later than the minimum one should work too. |
Sure, just keep in mind that this is not transparent for Conan. Conan CMake helper and toolchain may need to use new or updated commands to provide modules support. Such files generated by Conan will be incompatible with CMake 3.15 which is the official minimum requirement for Conan. |
I just noticed one interesting point to support CMake 3.17. It introduced "Ninja Multi-Config" generator which works perfectly well with "cmake_find_package_multi". With this, one build directory is enough to build every configuration in a robust way. mkdir build && cd build
conan install .. -s build_type=Release
conan install .. -s build_type=Debug
cmake .. -G "Ninja Multi-Config" -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
cmake --build . --config Release
cmake --build . --config Debug |
CMake is one of the main external tool we call from Conan, transparent integration and reliability should be a priority. It is important to declare a minimum supported version so we can run all the tests and be confident that the user will get the
expected results and no regressions will be introduced.