Note that the "guides" provided in the online CMake Reference Documentation are also precisely duplicated in the online "Mastering CMake" book.įinally, if one searches the above mentioned documentation sources and does not find the answer, then one can turn to web searches. It also contains tutorial coverage of key CMake concepts and other basic tutorial content (but usually at a less complete and detailed level compared to "Professional CMake"). This is an updated, free online version of Kitware's classic "Mastering CMake" paperback book that used to be sold (last updated for CMake 3.1 published in 2015). If one does not want to spend the $30 for the book "Professional CMake", then one may consider Kitware's Mastering CMake book. This helps to avoid accidentally using CMake features available only in newer versions. for the version X.Y listed in the project's top-level CMakeLists.txt file calling cmake_minimum_required(VERSION X.Y)).įor example, if minimum version is 3.17, then one would select that version in the drop-down box (taking you to ). editing the project's CMakeLists.txt files), when consulting the official reference documentation, it is advisable to view documentation for only the minimum version of CMake supported by the project (i.e. Command-line documentation for the cmake, ctest, and cpack executablesĪs a developer contributing to a project using CMake (i.e.Release notes for each version of CMake.User interaction Guide (for users trying to configure, build, install and test projects that use CMake).CMake Tutorial (for developers contributing to projects that use CMake).Documentation for the large collection of standard *.cmake modules that are installed along with CMake.Reference material for the entire CMake language including for every supported command, property, variable and related topic.This documentation is produced and versioned for every CMake release and contains a wealth of information including: The author is a significant contributor to CMake and collaborates closely with Kitware staff.Īnother important source of CMake documentation is Kitware's official online CMake Reference Documentation. (Therefore, $30 would cover every new edition over a 3 year period which includes 9 new CMake releases or 6 years if only downloading every other updated edition across 18 CMake releases.) The current edition of the book costs $30 which includes 9 updates for new editions of the book as they come out. This book is self published by the author in a downloadable PDF format with new editions coming out after each new CMake release (i.e. It also provides really critical low-level details and tips that are absent in even the official CMake reference documentation. This book addresses the "why" and big picture questions about CMake in a way that no other material has matched. It explains modern CMake idioms and best practices.Īlso, it covers older CMake commands and idioms to avoid and explains why. This book covers every basic CMake feature in great detail. The book contains excellent tutorial material for CMake and yet goes into deep concepts in the CMake language where needed (such as the gotchas and workarounds for dealing with lists and function/macro arguments with data containing quotes ", spaces and semi-colons, a frequently misunderstood aspect of CMake). The bssw.io editorial team has created this article informed by 13+ years of CMake usage and hundreds of hours of searching for and reading CMake documentation, especially in the years 2021-2022.Īrguably, the best resource for finding up-to-date guidance on how to use CMake is the most recent edition of the book Professional CMake (the 11th edition covering CMake versions up to 3.22 as of this writing). Kitware (the organization responsible for CMake development) makes three major releases each year (or about every four months).īest practices for using CMake evolve as new versions are released.įor example, at the time of this writing, CMake support for Generator Expressions is rapidly evolving and can have a dramatic impact on the best way to write CMakeList.txt files.) Year 2022, Self published, currently not versionedĬMake (which includes the executable tools cmake, ctest and cpack with each CMake installation) continues to evolve and improve fairly rapidly from release to release. Self published, new editions put out after each new CMake release
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |