I've just tried to experiment with this feature as I can see it being required for how we work. Unfortunately it forces version 3.3 of cmake to be required and we currently are on 2.8.12.2 and cannot move from this (yet.)
Any chance the earlier version can be supported, especially as the rest of the conan capability supports it!
Thank you.
[edit] I've realised I can actually go in and manually edit the generated toplevel CMakeLists.txt to change the minimum version, but this isn't very user friendly.
[edit] I've realised I can actually go in and manually edit the generated toplevel CMakeLists.txt to change the minimum version, but this isn't very user friendly.
What do you suggest? some minimum version has to be specified and 2.8 is very old now.
Well, the rest of conan supports 2.8.12, and the examples you provide also use 2.8.12, including the workspaces example code you provide. It has also been stated support for 2.8.12 is provided and will be for a while going forward.
So, I suggest 2.8.12 as this is consistent with the rest of conan.
I actually would suggest to change the rest of conan examples and defaults to CMake 3 馃ぃ
I really hope you don't do that, as that will kill our ability to use Conan :sob: I did bring this up in #3190 and was assured that 2.8.12 would be supported going forward (for the foreseeable future anyway.)
I actually would suggest to change the rest of conan examples and defaults to CMake 3
@keithrob91 I think @lasote is talking about using CMake 3 in the examples in the docs, in the conan new templates, etc, not about removing support for CMake 2.8.12.
OK. Anyway, is there any chance the workspaces feature could create the toplevel CMakeLists.txt with a minimum version of 2.8.12 and not 3.3 as that is consistent with the rest of the conan capability.
@keithrob91 One thing is the conan capabilities, that will keep compatibility with CMake 2.8, a different thing is a default in the templates and examples.
But isn't the workspaces feature part of conans capabilities? Therefore why is the toplevel CMakeLists.txt not created with compatibility with 2.8? Seems extremely bizarre to have a conan feature that doesn't work with 2.8 by default.
[edit] I've realised I can actually go in and manually edit the generated toplevel CMakeLists.txt to change the minimum version, but this isn't very user friendly.
So it worked, right? Then it is a Conan capability to support CMake 2.8
Seems extremely bizarre to have a conan feature that doesn't work with 2.8 by default.
editing a file is extremely bizarre? Come on...
We can discuss in a constructive way if it should be a section in the conan.conf to specify some defaults of the conan project.
Wow. I wasn't expecting that response. I thought I was having a sensible discussion about it and being constructive giving a users point of view. If I have given a different impression I apologise, but I assumed you would want genuine feedback.
On that specific point (user experience), having to change the file every time I want to use the feature, while easy, is not a good user experience, IMO.
I would happily welcome any way to change the behaviour, so a setting in conan.conf sounds fine.
On that specific point (user experience), having to change the file every time I want to use the feature, while easy, is not a good user experience, IMO.
^ That is authentic feedback, and we totally appreciate it. if you are regenerating the file several times, I agree it is a pain, but not because of conan is not supporting CMake 2.8, because it is completely supported. A user of CMake 3 could argument exactly the opposite. So the discussion is how we change the default of the generated root file.
As a cmake 2.8 user, my preferred solution is for the top level CMakeLists.txt to change to require 2.8 minimum. As far as I can tell (but I'm not an expert on cmake), that works fine for everyone 2.8 and onwards. It's my preferred solution because it means it just works.
Any other solution I think I have to defer to you and your advice, but a setting in conan.conf would be fine. If I forget to set it on a machine, I'll soon know about it and will then change it. I guess this solution also works for any of the other template files you create and wouldn't be workspaces specific.
that works fine for everyone 2.8 and onwards. It's my preferred solution because it means it just works.
If there is nothing in the workspaces feature that works better with CMake 3, I agree about changing the default to 2.8. But probably it is or will be something, it is still an experimental feature. @memsharded knows better.
If I forget to set it on a machine, I'll soon know about it and will then change it.
I recommend you to rely on the conan config install feature.
I guess this solution also works for any of the other template files you create and wouldn't be workspaces specific.
Could be, but currently (AFAIK) only in the base files generated by conan new have specified a minimum CMake version. And it is a different use case, in that files, you will change the line once. This is a different discussion but at some point, we should change the defaults (not the support) to CMake 3 and targets. For me, if we introduce something in the conan.conf file, it would be in a [workspaces] section.
If there is nothing in the workspaces feature that works better with CMake 3, I agree about changing the default to 2.8. But probably it is or will be something, it is still an experimental feature.
Understood. I'll wait to see what solution you choose and react as needed then.
I recommend you to rely on the conan config install feature.
Noted. Thank you.
With the new proposal in #4481, a conanworkspace.cmake will be generated instead of a CMakeLists.txt (maybe the CMakeLists.txt could be generated if not existing, for fast boostraping, but never overwritten).
So this issue shouldn't be a problem anymore with that.