Kitware Releases CMake 3.6
New support benefits the software development community.
Kitware released CMake 3.6 to improve the open-source, cross-platform family of tools that build, test, and package software. Among major areas of development, version 3.6 added a variable and a target property that inform generators to run the command that compiles the Clang Tidy tool. This tool easily integrates with CTest and CDash to offer advanced software-testing capabilities. The variable and the target property also tell the generators to run the compilers for C and CXX languages.
“CMake is quick to adopt support for new Clang-based abilities,” said Bill Hoffman, the creator of CMake and the vice president and chief technical officer at Kitware. “In addition to Clang Tidy, CMake supports analytics tools like AddressSanitizer (ASan), ThreadSanitizer (TSan), include-what-you-use, and scan-build. The software development kit (SDK) of Clang, which comes with a Berkeley Software Distribution (BSD) license, has made the creation of all of these fantastic tools possible.”
In another major area of development, the CMake 3.6 release simplified the deployment process for Windows Universal C Runtime libraries. Through a new option, the InstallRequiredSystemLibraries module can deploy the libraries with applications that Visual Studio 2015 builds. This option benefits members of the CMake community who make and distribute software binaries on Windows.
“The CMake community of users and contributors continues to grow at a quickening pace,” Hoffman said. “We applaud the efforts of all those who have made CMake such a productive tool. For the 3.6 release, developers from Microsoft continued to add code to CMake and take part in discussions on the mailing lists. It is fantastic to have compiler companies such as Microsoft support CMake, as their contributions make development easier. In the early days of CMake, we had to use reverse engineering and play catch-up, as companies released new compilers.”
Beyond added support and a simplified deployment process for Windows Universal C Runtime libraries, the CMake 3.6 release came with many additional noteworthy changes.
- The release acquainted functionality in CMake with features that Intel C++ compilers (versions 1 through 16.0) support on Unix platforms.
- The Ninja build tool improved with the release. The Ninja generator gained the ability to create phony targets that build sub-directories. The generator also learned to include system header files in build dependencies. The addition of these files affirm that system packages rebuild correctly when they update.
- The release unveiled a new sub-command that makes it easier to filter elements in a list. Now, CMake can filter elements by regular expression.
- CMake received a variable that informs Makefile generators to limit dependency scans to files in project source code and build trees. This not only enhances the performance of CMake, but it decreases build times.
- The release updated the ExternalProject module. The module can now create shallow clones of repositories. This capability allows the module to download more rapidly, run more quickly, and take up less disk space. The module also obtained more complete support for Git sub-modules, and it learned to refrain from unpacking downloads.
- Version 3.6 introduced a new variable that allows certain cross-compiling toolchains to build static libraries instead of executables. These toolchains include those that cannot link binaries without custom flags or scripts.
- The release enabled the Clang Format tool to format the CMake C++ code base.
For more information on CMake 3.6 and to download the software, please visit the CMake download page.
Development on CMake began in 2000, when it became clear that the Insight Segmentation and Registration Toolkit needed a cross-platform build environment. Since this time, the development team has worked to make CMake more powerful and scalable. Today, CMake handles complex directory hierarchies and projects that contain multiple libraries such as the Visualization Toolkit. The many organizations and communities that have adopted CMake include K Desktop Environment (KDE), Netflix, Second Life, Inria, The HDF Group, and RobotCub.
Kitware helps tailor CMake to specific workflows through custom consulting, training, and documentation resources. To learn how to leverage CMake and expertise in software development at Kitware, please contact kitware(at)kitware(dot)com.