CMake

CMake — Free Download. Software Build System
CMake is a tool designed to control the software compilation process using platform-independent configuration files. It generates native build files such as Makefiles or IDE projects, making dependency management and cross-platform builds easier.
★★★★★
5.0(1 ratings)

Download CMake (Official links)
File size: 37.3 MB
The latest version of CMake is: 4.4.4
Operating system: Windows, Linux, Mac OS
Languages: English
Price: $0.00 USD

  • Dependency management. CMake lets you define and manage dependencies between libraries and executables. It analyzes the relationships between project components and generates build instructions in the correct order, making sure every dependency is resolved before building.
  • Cross-platform configuration. CMake generates build files specific to different operating systems and development environments. It supports Windows, Linux, macOS and other platforms, adapting to the build tools available on each system.
  • IDE project generation. The tool can create project files for environments such as Visual Studio, Xcode and Eclipse. This simplifies integration with popular IDEs without manual setup.
  • Automated testing. CMake includes support for CTest, a testing system that lets you define, run and manage unit and integration tests straight from the build scripts.
  • Custom installation. Provides commands for defining installation rules for binaries, libraries and header files. This makes it possible to package and distribute software in a structured way.
  • Library search. CMake can locate external libraries and packages on the system. It uses find scripts to detect the paths, versions and settings needed for compilation.
  • Configurable variables and options. Developers can define variables and options that change how the build process behaves. These settings can be adjusted through the command-line interface or graphical interfaces.
  • Cross-compiler support. CMake allows you to set up cross-compilation environments, where code is built for a platform different from the host system. This is essential for embedded development and heterogeneous systems.
  • CPack integration. CPack is a tool bundled with CMake for generating distribution packages in formats such as DEB, RPM or NSIS. It makes it easier to create installers for different operating systems.
  • Reusable modules and scripts. CMake offers a library of predefined modules for common tasks, such as finding libraries or configuring compiler features. Developers can also write their own custom modules.

CMake was created in 2000 by Kitware, a company specializing in open-source software for scientific visualization and data processing. It is developed in C++. Originally designed as an alternative to traditional build systems, CMake has grown into a standard tool for cross-platform software development. Its adoption has increased significantly in both open-source and commercial projects thanks to its flexibility and its ability to adapt to complex environments.


Alternatives to CMake:

For CMake there is 1 alternative program. Free: 1, paid: 0.

UnrealHub — Free Download. Centralized manager for Unreal Engine assets

UnrealHub

A desktop application designed to unify the management of Unreal Engine installations and projects within a single interface.
Price: Free   Size: 76.8 MB   Version: 1.6.1   OS: Windows, Linux, MacOS

Changelog

Version: 4.4.4
  1. New cmake_diagnostic() command to manage CMake's diagnostic state. It replaces the older variable-based approach, introduces several new categories, and makes adding more categories in the future far cheaper.
  2. New diagnostic category CMD_INSTALL_ABSOLUTE_DESTINATION, which warns when install() is given an absolute DESTINATION. It can be controlled through the -Winstall-absolute-destination option, the installAbsoluteDestination field in presets, or cmake_diagnostic().
  3. Presets now support schema version 12. In it, the ${fileDir} macro expands to the directory of the presets file that contains it, even when another preset in a different directory inherits it.
  4. cmake, ctest, and cpack gained the --presets-file argument, which loads presets from a chosen file instead of CMakePresets.json or CMakeUserPresets.json.
  5. Test presets gained the testPassthroughArguments field for forwarding arguments to test executables.
  6. The file API (codemodel version 2) moves to version 2.11. The sources and interfaceSources objects of target gained fileSetIndexes, and sources gained backtraces, to support sources that belong to several file sets. The older fileSetIndex and backtrace fields remain for backwards compatibility only. The fileSetType field of installers also accepts the new SOURCES value.
  7. Instrumentation moves to data version 1.1 and adds two options: captureOutput, which collects stdout and stderr from instrumented commands, and compileTrace, which stores trace files produced by the compiler (for example, via Clang's -ftime-trace).
  8. Ninja generators can create a test_prep/<test-name> target for every test defined with add_test(), building all of its dependencies: the executable the test runs, targets referenced in generator expressions in the test command, and those listed with the new BUILD_DEPENDS option. It is enabled with the CMAKE_TEST_BUILD_DEPENDS variable. A test_prep/all target is generated too. Tests whose names are not valid target names are skipped, and tests sharing a name across directories are merged into one target.
  9. CUDA language level 23 (matching C++ 23) is supported with NVCC 13.3 or newer.
  10. C++ 20 named modules work with clang-cl, except under the Visual Studio generators (the ClangCl toolset).
  11. New support for the ibm-flang compiler (id IBMFlang), the Pelles C toolchain (id PellesC), and the ASM_POASM language for the Pelles Macro Assembler. The Open Watcom wlink linker is identified as OpenWatcom and the wild linker as WILD in CMAKE_<LANG>_COMPILER_LINKER_ID.
  12. Command line: cmake accepts --build <dir> --preset <pre> from any working directory; the -D option fills in a default HELPSTRING for known variables; cmake --install can install several components and accepts both -j<N> and -j <N>; the cmake -E copy commands (copy_if_different, copy_if_newer, copy_directory, copy_directory_if_different, and copy_directory_if_newer) take the -t argument; and cmake -E tar gained --cmake-tar-encoding to set the pathname encoding inside archives.
  13. New commands: cmake_diagnostic() and discover_tests(). The latter registers tests that ctest discovers at test time by running a discovery command and building names, arguments, and properties from regular-expression captures.
  14. block() can create a DIAGNOSTICS scope, and include() accepts the NO_DIAGNOSTIC_SCOPE option. if() gained the DIAGNOSTIC operator, which reports whether CMake knows a given diagnostic category.
  15. cmake_parse_arguments() gained the PARSE_ARGN signature, which begins parsing after the last named argument of the calling function and behaves like PARSE_ARGV.
  16. execute_process() supports ENVIRONMENT and ENVIRONMENT_MODIFICATION to run child processes with a modified environment.
  17. file(ARCHIVE_CREATE) and file(ARCHIVE_EXTRACT) gained the ENCODING option for archive pathnames, now defaulting to UTF-8 (policy CMP0213). file(READ_SYMLINK) gained the RESULT option to capture errors without failing.
  18. list(FILTER) gained a PREDICATE mode, list(SORT) a COMPARATOR keyword, and list(TRANSFORM) an APPLY action and a PREDICATE selector. All of them call a user-defined function(). In addition, string(JSON ... PARTIAL_EQUAL) compares two JSON values using partial equality.
  19. File sets: a new SOURCES type to declare a target's source files, plus the new properties CXX_SCAN_FOR_MODULES, INDEPENDENT_FILES, JOB_POOL_COMPILE, SKIP_LINTING, SKIP_PRECOMPILE_HEADERS, and SKIP_UNITY_BUILD_INCLUSION. SCOPE, TYPE, BASE_DIRS, SOURCES, and INTERFACE_SOURCES were also added to expose the declared details of a file set.
  20. The CMAKE_INSTALL_DEFAULT_COMPONENT_NAME variable accepts the special value <PROJECT_NAME>, which makes each install() take its default component name from the current PROJECT_NAME. The new environment variable CMAKE_DISABLE_PRECOMPILE_HEADERS turns precompiled headers off by default.
  21. Properties: VERIFY_INTERFACE_HEADER_SETS and VERIFY_PRIVATE_HEADER_SETS now always create the per-target verification target and the aggregate targets (all_verify_interface_header_sets, all_verify_private_header_sets, and all_verify_header_sets), even without matching header sets, and now support OBJC and OBJCXX besides C and CXX. VS_SOLUTION_DEPLOY now works for targets created with add_custom_target().
  22. Modules: write_basic_package_version_file() in CMakePackageConfigHelpers supports the SamePatchVersion, SameFullVersion, and SemanticVersion modes (the latter is stricter with 0.y.z versions), and ExactVersion is now deprecated. ExternalData gained ExternalData_LINK_MODE, to choose the order of file materialization among hard links, symbolic links, and copies, and ExternalData_STATE_ROOT, to keep hash records outside ExternalData_BINARY_ROOT.
  23. ExternalProject and FetchContent gained CMAKE_EP_GIT_CLONE_RETRY_COUNT and CMAKE_EP_GIT_CLONE_RETRY_DELAY to control git clone retries. FindCUDAToolkit creates the CUDA::sanitizer target and, from CUDA 11.4, an imported target for cufilt. FindPython and FindPython3 support the Stable ABI for free-threaded Python (SABIT) as defined in PEP 803.
  24. The TARGET_OBJECTS generator expression accepts the optional SOURCE_FILES:... argument, which limits the output to objects built from the given source files.
  25. Swift: Ninja generators gained the Swift_SEPARATE_MODULE_EMISSION property (initialized by CMAKE_Swift_SEPARATE_MODULE_EMISSION) to emit .swiftmodule from a dedicated build edge; policy CMP0215 enables it by default and requires CMP0157 and CMP0195 set to NEW. The default Swift_MODULE_NAME now swaps hyphens for underscores, Swift targets get a package name by default (policy CMP0216), the Swift_PACKAGE_NAME property was added, and on Windows the $<TARGET_PDB_FILE:...> generator expressions are supported.
  26. CTest: extra arguments can be forwarded to test executables after a -- separator, the new --source-dir option (together with -T Configure) lets it configure an empty binary directory, and in Dashboard Client mode it gained the CoverageTool option for llvm-cov coverage and the CTEST_SUBMIT_PARTS variable to limit which parts are uploaded.
  27. ctest_configure(), ctest_build(), ctest_test(), and ctest_memcheck() accept PRESET and PRESETS_FILE, which can also be set through CTEST_CONFIGURE_PRESET, CTEST_BUILD_PRESET, CTEST_TEST_PRESET, CTEST_PRESET, and CTEST_PRESETS_FILE. ctest_update() gained VERSION_ONLY and VERSION_OVERRIDE.
  28. CPack: the Archive generator gained CPACK_ARCHIVE_ENCODING for pathname encoding, the NSIS generator gained CPACK_NSIS_IGNORE_COMPONENTS_PAGE to skip the component selection page, and CPACK_RPM_SPEC_MORE_DEFINE now takes a list of definitions.
  29. Deprecated: the -W[no-][error=]dev options (new spelling: -W[no-][error=]author), --warn-uninitialized (now -Wuninitialized), --no-warn-unused-cli (now -Wno-unused-cli), and the CMAKE_WARN_DEPRECATED and CMAKE_ERROR_DEPRECATED variables, replaced by cmake_diagnostic(). The MACROS directory property no longer exists (policy CMP0217).
  30. Other changes: a file may belong to only one non-HEADERS file set per target (CMP0211); macro() and variable_watch() callbacks keep backslashes in arguments (CMP0219); ctest exits with a non-zero code when run without arguments and no test input file exists; test drivers from create_test_sourcelist() support -N to list tests, one per line; executables given to DEPENDS in add_custom_command() keep their .exe suffix when target-level dependencies are established (CMP0212); and targets providing C++ modules can be consumed by targets with different compile features and options.

New programs