hooks icon indicating copy to clipboard operation
hooks copied to clipboard

[conan center] add clarification why CMake 3.1 is required

Open SSE4 opened this issue 5 years ago • 6 comments

right now our conan-centre hook requires CMake 3.1 here. it outputs the following message:

The test_packages/CMakeLists.txt requires CMake 3.1 at least. Update to 'cmake_minimum_required(VERSION 3.1)

while it says CMake 3.1 is required, it doesn't say anything about why CMake 3.1 is required. it's confusing for users, as it's hard to understand:

  • which particular feature used in CMakeLists.txt requires version 3.1
  • which specific line triggered error
  • why required version is 3.1 (e.g. not 3.0 and not 3.2 - was it arbitrary choice?)

this requires further clarification

SSE4 avatar Sep 05 '20 20:09 SSE4

There is an issue in Conan asking about the general cmake version used by companies, all people responded 3+.

CMake 3.1 has some advantages over 3.0: https://cmake.org/pipermail/cmake/2014-December/059418.html But the more important feature is Targets.

That hook help us reviewing more the Conan recipe than a cmake file. We needed to check if test_package/cmakelists.txt had target declared and the minimal version was 3, which is not our focus.

uilianries avatar Sep 08 '20 18:09 uilianries

There is an issue in Conan asking about the general cmake version used by companies, all people responded 3+.

I remember the issue, but can't find it right now. The GitHub search is really terrible for things like this

searching for "cmake version" brings up dozen of issues, since all those issues mention "cmake" and "version" in some context 🙄

Croydon avatar Sep 08 '20 18:09 Croydon

Yes, I didn't find too, that's why I didn't point the issue.

uilianries avatar Sep 09 '20 12:09 uilianries

this one? https://github.com/conan-io/conan/issues/7064

SSE4 avatar Sep 09 '20 14:09 SSE4

Yes, thanks!

Croydon avatar Sep 09 '20 14:09 Croydon

@SSE4 is a wizard!

uilianries avatar Sep 09 '20 17:09 uilianries