Introduction

CMake is an open source build and installation manager for software projects, which allows the configuration of parameters for the build process through a simple and portable text file format. The file, is used to generate native build project files for different tools including Integrated Development Environments, Microsoft Visual Studio, Xcode, as well as UNIX, Linux, Nmake, etc. style Makfiles.

In other words, CMakes allows the creation of portable files which later are used to generate the project files that are required to build your project in a specific platform. Thanks to this, the project only needs one file instead of mantaining one for each platform your software will run.

CMake handles the difficult part of building cross platform software by eliminating the need of manually creating system inspections and allowing easy tailor build for complex hardware and software systems.

For a project where there are multiple developers working at the same time targeting multiple platforms, where each platform could have a wide range of configurations, compiler versions, interpreter versions, libraries, hardware, etc, the probability of encountering systems where your project will fail to build grows as the number of users using your platform grow. To tackle these problems, CMake provides:

  • The ability to automatically search for programs, libraries and header files that are required by your project. Including read access to environmental variables and Windows registry values.

  • Creation of directories outside of the source tree. As is going to be remarked later, this feature allows the removal of the complete build directory without affecting the project.

  • Creation of complex custom commands that can be used to generate new source files during the build process which later are compiled into the final version of the software. This characteristic is used by projects like Qt, SWIG, 0AD, Tensor Flow

  • Generation of workspaces and projects from the same configuration file depending on conditional factors, allowing the user to have many test cases as needed, orthogonal from each other.

  • Generation of file dependencies on different platforms, stopping the build process in case a dependency is not satisfied.

  • The ability to move from static to dynamic builds base on conditional parameters. Allowing the user to create static binaries in platforms where dynamic binaries would have low performance or wouldn't be possible because of limitations in the system.

  • The ability for testing machine specific characteristics, such as number of cores in the CPU

  • The ability of creating configuration files based on platform dependent information such as the path of shared libraries (including translation of path to style specific for the operating system).

results matching ""

    No results matching ""