Introducing CMake CMake is an excellent build system, I much prefer it to autotools and certainly prefer it in comparison to hand-crafting Makefile’s! 09 tutorial with a build system! It’s beaglebone black programming by example pdf easy to describe to CMake because it doesn’t need to know much.
Don’t forget a trailing path separator! I think you can read CMake files relatively easily even when you’ve never seen it before. The toolchain file describes our toolchain. CMake to essentially set the system type to something CMake doesn’t yet know about.
The CROSS_COMPILE settings is simply the toolchain executable prefix. CMake that it shouldn’t try to use the compiler before we tell it to. The CMAKE_OBJCOPY setting looks a bit fancier doesn’t it! CMake files in the build system. Therefore we force CMake to add this to the cache.
CMake knows how to use it. In fact most things in CMake are strings. As with autotools, CMake uses a configuration step which works out what should be built and how. CMake’s simple program compilation test. We specify a minimum version required, I just tend to start at 2.