Your submission was sent successfully! Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

CMake leverages the Snapcraft Summit with Travis CI to build snaps

This article is more than 5 years old.


CMake is an open-source, cross-platform family of tools designed to build, test and package software. It is used to control the software compilation process and generate native makefiles and workspaces that can be used in any compiler environment. 

While some users of CMake want to stay up to date with the latest release, others want to be able to stay with a known version and choose when to move forward to newer releases, picking up just the minor bug fixes for the feature release they are tracking. Users may also occasionally need to roll back to an earlier feature release, such as when a bug or a change introduced in a newer CMake version exposes problems within their project.

Craig Scott, one of the co-maintainers of CMake, sees snaps as an excellent solution to these needs. Snaps’ ability to support separate tracks for each feature release in addition to giving users the choice of following official releases, release candidates or bleeding edge builds are an ideal fit. When he received an invitation to the 2019 Snapcraft Summit, he was keen to work directly with those at the pointy end of developing and supporting the snap system. 

He believes snaps can help projects connect with the user population by providing an easy, trustworthy installation path. In his opinion, “users often do not want to install anything that is not in an official repository, and they want the install process to be both simple and familiar.” Together, the Snap Store and snaps meet these requirements. 

Discoverability of CMake is becoming less of an issue these days. According to Craig, “if you’re working  in C++, CMake is getting hard to ignore. Developer surveys show that CMake has become the leading build system for C++ projects.” Therefore, the biggest benefit of having CMake available in the Snap Store is to give users convenient access to official releases in a timely fashion.

CMake’s active user and developer communities ensure that there is a fairly constant stream of contributions in the form of enhancements and fixes. Continuous integration (CI) is part of CMake’s DNA and Craig plans to use Travis CI to automatically release CMake in the edge channel of the Snap Store, in addition to official releases and release candidates. He spent a couple of days at the Summit working directly with the Travis CI team, working through how to set up the builds to be reliable and easy to maintain. “Some of the challenges were related to automatically determining the feature release track to submit builds to and setting up scheduled daily builds to follow CMake development. I found answers to questions on some of the Travis CI and Snapcraft documentation and worked with both teams to iron out several speed bumps.”.

Improvements to snaps that Craig would like to see include better SELinux compatibility. Improving this would further strengthen the case for snaps becoming the standard way of packaging on Linux. Indeed, “Whether an app or a tool is standard and gaining adoption are important points for me when deciding where to spend my time maintaining a project like CMake.”

Craig also has some advice for developers thinking of using snaps. He suggests, “First, find a project in the Snapcraft Store with similar needs to yours. Then look at how they have structured their Snapcraft builds and integrated them into whichever CI system they are using.” He finds the documentation is sometimes behind concerning the latest patches, so it makes sense to leverage the success of another project that already works.

What did he think of the Summit? Craig was impressed to see how quickly people were putting things together and the overall sense of progress. He also said, “People can come to the Summit not only with the expectation of learning how snaps and Snapcraft work, but also with the goal of getting to know other project maintainers and establishing mutually beneficial networks.” With the range of applications in the Snapcraft Store increasing, he would now like to see the tool chain community representation growing too.


Install the CMake snap here.

Ubuntu desktop

Learn how the Ubuntu desktop operating system powers millions of PCs and laptops around the world.

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

Star Developers are here!

We are happy to announce that the newest community feature of the Snap Store is here: Star Developers! Background  In the Snap Store, we have a fantastic...

6 facts for CentOS users who are holding on

Considering migrating to Ubuntu from other Linux platforms, such as CentOS? Find six useful facts to get started!

Why is Ubuntu Linux the leading choice to replace CentOS for financial services?

Financial services are powered by technology. The customer experience is increasingly driven by data, with tailoring of products and services to reflect...