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

cmake: Add CMake file API support #6074

Merged
merged 5 commits into from
Oct 20, 2019
Merged

Conversation

mensinda
Copy link
Member

The file API will automatically be used when CMake >= 3.14
is detected. This new API is meant as a replacement for the
now deprecated CMake server API.

The new API (mostly) provides the same information in a
different format. Thus only a slight bit of refactoring was
necessary to implement this new backend.

@mensinda mensinda added the dependency:cmake Issues related to `dependency` with the `cmake` method label Oct 18, 2019
@mensinda
Copy link
Member Author

CMake 3.14 ist still fairly new, so I don't know if this code path is actually tested in the CI. If I am parsing things correctly, Travis should be currently using 3.12 because the docker image is based on Ubuntu cosmic.

@jpakkane
Copy link
Member

It's using cosmic, because in disco running dub immediately segfaults. I'll try to update the CI image to eoin this weekend, the issue should be fixed in it.

@mensinda
Copy link
Member Author

As far as I can tell from the ubuntu packages list eoan also only provides 3.13 in the repositories. However, the file API was first introduced in 3.14.

Maybe use pip: https://pypi.org/project/cmake ?

@jpakkane
Copy link
Member

Oh, it seems that Debian has not updated CMake after Buster's release. I wonder why, that's a bit problematic...

@mensinda
Copy link
Member Author

Not sure what's going on with debian / ubuntu packaging. I also haven't found a PPA for CMake. Installing CMake via pip seems to be the best option for now.

Alternatively, are you open for an Arch-based docker image https://hub.docker.com/r/archlinux/base? I would be willing to set up the docker file.

@jpakkane
Copy link
Member

We use an Ubuntu image on purpose because it is by far the most popular platform for Linux development.

@jpakkane
Copy link
Member

CI image is updated. FWICT Azure should run a new enough CMake. It is a bit unfortunate that we don't print the CMake version. Could you add a function in run_project_tests.py called print_tool_versions that is called after detect_system_compiler that detects if CMake is installed and, if it is, prints its version string? We can add other auxiliary tools to that same function as necessary.

The file API will automatically be used when CMake >= 3.14
is detected. This new API is meant as a replacement for the
now deprecated CMake server API.

The new API (mostly) provides the same information in a
different format. Thus only a slight bit of refactoring was
necessary to implement this new backend
@mensinda
Copy link
Member Author

Done. In Azure, the CMake version is new enough (even in cygwin). However, Travis still uses 3.13.4. Do we keep it this way, to also test the legacy CMaker server API code path?

@jpakkane
Copy link
Member

Travis will use whatever the latest Ubuntu ships with. It'll be that way at least until 20/04 is released, since they don't update software versions within a release (only bugfixes).

@jpakkane jpakkane merged commit aece7ec into mesonbuild:master Oct 20, 2019
@mensinda mensinda deleted the cmFileAPI branch October 20, 2019 14:50
@scivision
Copy link
Member

So it sounds like we test the CMake file API on Azure and the deprecated CMake server API on Travis?

@mensinda
Copy link
Member Author

Essentially yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency:cmake Issues related to `dependency` with the `cmake` method
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants