Embodied AI Glossary中文

CMake

Common

A cross-platform build-configuration tool for C/C++ projects that spells out exactly how to compile them.

CMake is an open-source build-system generator led by Kitware. C/C++ code has to be compiled and linked to become an executable program, and once a project has many files, something needs to tell the compiler what to build first and which libraries it depends on. CMake reads a project’s CMakeLists.txt and generates the build files for a given platform (such as a Makefile or Ninja file), which then invoke the actual compiler. A large amount of low-level robotics code is C++; ROS 1’s catkin and ROS 2’s ament_cmake are both built on top of CMake, and libraries such as Pinocchio and OpenCV also need it when installed from source.

ExampleThe common three-step source install for a library: mkdir build && cd build, cmake .., make -j8.

Also called
CMakeLists.txt
Related
colcon · ament · catkin · Cross-compilation · Python and C++
Sources
CMake 官网 (Chinese)

See it in the full glossary →