Skip to content
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

Unify cmake_minimum_required to 3.14.2 #1315

Merged
merged 1 commit into from
Jan 11, 2020
Merged

Unify cmake_minimum_required to 3.14.2 #1315

merged 1 commit into from
Jan 11, 2020

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jan 6, 2020

  • Set cmake_minimum_required in top level projects to 3.14.2 (the lowest version used by the CI currently)
  • Delete cmake_minimum_required from child projects
  • Leave the cmake_minimum_required alone in vendored projects (zlib)

Fixed #1311

@jkotas jkotas changed the title WIP: Unify cmake_minimum_required to 3.15.5 Unify cmake_minimum_required to 3.15.3 Jan 6, 2020
@jkotas jkotas requested a review from jkoritzinsky January 6, 2020 04:28
@jkotas jkotas changed the title Unify cmake_minimum_required to 3.15.3 Unify cmake_minimum_required to 3.14.2 Jan 6, 2020
@danmoseley
Copy link
Member

Does CMake allow the cmake_minimum_required to be in a shared imported file?

@danmoseley
Copy link
Member

Should we upgrade the CI machines?

@jkotas
Copy link
Member Author

jkotas commented Jan 6, 2020

Should we upgrade the CI machines?

I do not see a good reason to. We have more important things to do. Note that forcing newer version of the tools is creating a lot of busy work for everybody. I think it should be done with very low frequency (e.g. once a year at most).

@jkotas
Copy link
Member Author

jkotas commented Jan 6, 2020

Does CMake allow the cmake_minimum_required to be in a shared imported file?

Probably yes. There is a lot of other stuff that the top-level cmake files can share.

@am11
Copy link
Member

am11 commented Jan 6, 2020

the lowest version used by the CI currently

Typically the cmake_minimum_required version is the lowest version which supports all features used by the project. The lower this version is the less pain it is to build the project to older platforms, so folks normally tend to push back a little and rev min version sparingly. For example, the version of cmake provided by yum on CentOS 6.10 i386 (rel. JUL 2018) is v2.8.8 (rel MAY 2013). In such platforms, the only option is to compile newer cmake from source by ourselves.

@jkotas
Copy link
Member Author

jkotas commented Jan 6, 2020

The lower this version is the less pain it is to build the project to older platforms, so folks normally tend to push back a little and rev min version sparingly.

Yes, I agree. For better or worse, we officially require 3.15.5 now and I hope that we won't bump this for a while.

@danmoseley
Copy link
Member

Yes, I agree. For better or worse, we officially require 3.15.5 now and I hope that we won't bump this for a while.

If we're not updating the CI machines, it sounds like it's 3.14.2 isn't it? (And docs should match)

As I understand it, we have periodically required a newer CMake in order to create project files that open clean in the latest VS, and many folks on the team stay up to date with previews, etc. Perhaps the way forward is to require 3.14.2 as long as possible, but allow newer versions, adding "policy" directives as needed to ensure we get the same result from both.

@jkotas
Copy link
Member Author

jkotas commented Jan 6, 2020

it sounds like it's 3.14.2 isn't it?

I believe that we need 3.15.x on Windows, but can get away with a bit lower version on Unix.

@jkotas
Copy link
Member Author

jkotas commented Jan 6, 2020

we have periodically required a newer CMake in order to create project files that open clean in the latest VS

Yes, we required newer CMake on Windows to keep up with latest VS. The minimum required version on non-Windows was quite a bit lower. The thing that forced us to 3.14+ on non-Windows was taking advantage of the new CMake features.

adding "policy" directives as needed to ensure we get the same result from both.

I do not follow. You will get the same results as long as you specify the target version.

@danmoseley
Copy link
Member

I do not follow. You will get the same results as long as you specify the target version.

You're right - you already explained that cmake_minimum_required also sets the "compat mode" to that version.

@danmoseley
Copy link
Member

OK to indicate 3.14.2 in https://github.com/dotnet/runtime/blob/master/docs/workflow/requirements/linux-requirements.md ? It currently does not specify. They'll find out as soon as they hit build, but it is nice to know when you set up.

@jkotas
Copy link
Member Author

jkotas commented Jan 6, 2020

@jkotas
Copy link
Member Author

jkotas commented Jan 11, 2020

@danmosemsft @jkoritzinsky Could you please take a look and sign-off if the change looks good?

- Set cmake_minimum_required in top level projects to 3.14.2 (the lowest version used by the CI currently)
- Delete cmake_minimum_required from child projects
- Leave the cmake_minimum_required alone in vendored projects (zlib)
- Note CMake version in the docs

Fixed #1311
@jkotas jkotas merged commit ffcb1fa into dotnet:master Jan 11, 2020
@jkotas jkotas deleted the cmake-version2 branch January 14, 2020 07:34
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enforce CMake version consistently (currently 7 different ones)
5 participants