Скотт крейг профессиональный cmake практическое руководство

Synopsis

CMake is a very popular tool for defining how projects should be built, tested and packaged. Its maturity, breadth of features, broad platform support and toolchain flexibility have led to its widespread adoption among the software development community. In recent years, the 3.x release series has brought with it a whole new set of powerful capabilities and best practices, leading to the coining of the term Modern CMake. But “modern” is a moving target. Therefore, a key motivation for this book is to provide developers with an up-to-date, practical guide to learning CMake, paying particular attention to the latest best practices. As a CMake tutorial, it follows a logical sequence from basic concepts through to more advanced topics. Complementing that, the chapter structure also allows the more experienced user to quickly find and focus in on a particular area of interest.

Part I: Fundamentals

The first part of the book introduces each of the fundamental areas of CMake. These early chapters are arranged to get the reader up and running quickly with a basic project, then progressively build up an understanding of CMake’s core concepts in manageable, structured units. These chapters not only present the key concepts, they also shape the reader’s understanding of how CMake can be used most effectively and how to avoid common pitfalls.

Part II: Builds In Depth

The middle part of the book goes into much greater detail about various key areas and has a more task-focused flavor. Much of the material addresses everyday problems frequently faced by developers, while many of the chapters cover features that are new or improved in the 3.x release series.

Some chapters go even deeper than discussing CMake alone. Topics covered include advanced linking techniques, how to structure libraries, managing versioning across platforms, and an in-depth treatment of Apple-specific technologies such as bundles, frameworks and code signing.

The many recommended practices in this part of the book demonstrate how developers can get the most out of CMake’s extensive feature set. They also draw attention to a number of common but discouraged practices and explain why they should be avoided.

Part III: The Bigger Picture

The final part of the book expands the reader’s focus. It encourages looking beyond the project in isolation, seeing it from different perspectives and use cases. It tackles head on one of the more difficult tasks faced by developers, that of managing the complexities of inter-project dependencies. These chapters discuss CMake features for finding and providing dependencies, making a project consumable by others, how to robustly prepare packages in various formats and how to follow common platform conventions.

Other aspects that feature prominently in this part of the book include project integrity, ease of development, maintainability and onboarding new developers. Examples of this include a deep coverage of CMake’s extensive testing support, and the important topic of simplifying a developer’s workflow using CMake presets. Project organization is also covered in detail, providing a solid foundation for production-scale projects.

A separate chapter covers various aspects of build performance. The heavy focus on production-scale issues and functionality makes this one of the most valuable chapters of the book. The techniques presented can potentially give drastic reductions in build time and lead to more efficient use of build resources.

The final chapter covers the special area of Qt support. It includes discussion of features provided by both CMake and Qt, covering topics including moc, uic and rcc support, translation handling and using Qt’s deployment tools.

The handbook for every CMake user, providing structured learning, the latest best practices and real-world advice from one of the CMake co-maintainers.

    GenresProgrammingTechnologyComputer ScienceSoftware

420 pages, ebook

First published July 10, 2018



About the author


Ratings & Reviews


Friends & Following

Community Reviews

Displaying 1 — 10 of 10 reviews

Profile Image for Anton.

1 review

August 5, 2020

By far the most encompassing source of CMAKE there is to this point.
It gave me the deep and systematic understanding of CMAKE I was searching for.
Highly advised to read it and then keep it as a reference to anybody who’s starting or working with CMAKE!

Thank you Craig, now I’m enjoying working with CMAKE projects much more :)


October 19, 2020

Well worth the price of admission. Have been making do with what I could find on the web, and wish I’d known about this book months ago.

This system seems to be taking over my code biome, and now I have to be able to get into and drive exisiting cmake controlled projects. This book is the missing epoxy matrix of the fiberglass composite of cmake documentation online.

I suspect the material here will become completely superflous shortly, as it enters into my working knowledge, but this book is what got it there. Already a bunch of the things I’d been wondering about are made completely clear, and I see the overall structure of how it is controlled much more clearly. I’m about to dive back into getting getting the projects working on a new system, and knowing me, this will be the last time I would give a review, but this is the book I was looking for.


Profile Image for Esteban Duran.

2 reviews

May 19, 2021

This is hands down one of the best if not the best books on CMake I’ve ever read. This book strikes the perfect balance of giving enough context and information without simply regurgitating the official CMake documentation. Additionally, the author is constantly updating the book and providing new releases alongside any new CMake release. I highly recommend this book.


June 6, 2021

Exceptional modern CMake book. I have been looking for a decent modern CMake book for a long time. Internet has many bits and pieces here and there, the CMake documentation is way too dry and not providing real guidance. There are some books, even recommended in the official CMake site, that are either old, or only in paper, or just have bad reviews.

I did not know about this book, it does not appear in Amazon/Kindle (at least not to me), but searching and searching at last I got a glimpse of it in some «good CMake books» list. I loved the small free portions available and paid the US 30$ for it to download it directly from the author’s website.

I downloaded it in the 3 DRM-free formats: PDF, Mobi and ePub, and both the contents and the presentation are phenomenal. It guides you over CMake as I had been wishing for many years, including the most modern techniques and best practices, in a well explained and to the point manner.

Not only that, but the author also promises to allow access to future editions with the newer CMake versions and practices as they evolve over time.

I want to thank the author for this amazing work, that is helping me immensely in improving the CMake scripts in a project I’m working on as well as other projects I might be involved in the future (personal or otherwise). Great work!!

    programming

August 5, 2019

Professional CMake shows the latest conventions and guides the reader through all aspects in a good CMake build system. It addresses many problems I had been facing when I started learning CMake before I actually bought this book.
I worked myself through a big part of it but still haven’t used all parts of the book and it is going to serve as a valuable reference once I get to that in future projects.


August 13, 2018

Well written book that gives good practical advice. It guides the reader from one topic to the next building on previous chapters. Concepts and goals are covered as entities, making it clear how the various pieces fit together.

The official reference documentation becomes more useful after reading this book.


Profile Image for Brian Salehi.

17 reviews1 follower

April 22, 2022

This book is an essential first step into knowing CMake, well because there are not many CMake books to read and the documentation coming with CMake is far away from being good for beginners.
That missing one star is for the lack of practical examples in many chapters and somehow leaving readers with theoretical explains and no scenarios.
Anyway, it’s good to have it in my library and review it occasionally.

    stage-x

May 6, 2020

Great book, good in-depth coverage for most valuable practical questions…
BUT it only 3 stars as I can’t use Apple Pencil + iBook to annotate it, as downloadable PDF is LOCKED!
It’s SO frustrating.
Good book + Best reading platform => not ideal experience.

It’s definitely something that can and should be fixed.

UPD: found a way around this issue, details in the comments below.


Profile Image for Marcus Mors.

19 reviews

November 18, 2022

Useful, but kind of confusing. Even thought I read at least half the book, cmake still looks awfully verbous and full of errors.

Displaying 1 — 10 of 10 reviews


Профессиональный CMake. Практическое руководство [2018] Скотт | Physics.Math.Code

Профессиональный CMake. Практическое руководство [2018] Скотт Крейг (рус + анг версии книги) Скачать книгиТем, кто уже давно использует CMake, темы могут показаться относительно знакомыми, но материал также включает в себя знания, полученные в ходе реализации реальных проектов и взаимодействия с сообществом CMake. Даже опытным пользователям будет полезно прочитать хотя бы раздел «Рекомендуемая практика» в конце каждой главы.
#cmake #компиляция #программирование #cpp #cplusplus #си #C

Professional CMake: A Practical Guide, 14th Edition

Название: Professional CMake: A Practical Guide, 14th Edition
Автор: Craig Scott
Издательство: Crascit Pty Ltd
Год: 2023
Страниц: 664
Язык: английский
Формат: pdf (true)
Размер: 10.06 MB

Professional CMake: A Practical Guide is the handbook for every CMake user, from beginner to seasoned veteran. It contains hundreds of pages of real-world advice, best practices and insights gained from production projects and interaction with the CMake community.

Topics cover the complete software pipeline, from the very initial setup of a project through to testing, packaging and integration with other projects. Important more advanced topics like improving build performance are also covered.

Each chapter focuses on a particular theme or fundamental concept. Read them in order as a structured CMake tutorial, or jump to specific chapters to focus on a particular topic or solve a specific problem. Every chapter ends with a Recommended Practices section highlighting the most important points.

Whether a seasoned developer or just starting out in a software career, one cannot avoid the process of becoming familiar with a range of tools in order to turn a project’s source code into something an end user can actually use. Compilers, linkers, testing frameworks, packaging systems and more all contribute to the complexity of deploying high quality, robust software. While some platforms have a dominant IDE environment that simplifies some aspects of this (e.g. Xcode and Visual Studio), projects that need to support multiple platforms cannot always make use of their features. Having to support multiple platforms adds more complications that can affect everything from the set of available tools through to the different capabilities available and restrictions enforced. A typical developer could be forgiven for losing at least some of their sanity trying to keep on top of the whole picture.

Fortunately, there are tools that make taming the process more manageable. CMake is one such tool, or more accurately, CMake is a suite of tools which covers everything from setting up a build right through to producing packages ready for distribution. Not only does it cover the process from start to end, it also supports a wide range of platforms, tools and languages. When working with CMake, it helps to understand its view of the world.

Скачать Professional CMake: A Practical Guide, 14th Edition

CMake Discourse

Loading

Понравилась статья? Поделить с друзьями:
  • Подкормка крепыш для рассады инструкция по применению
  • Карандаш машенька от тараканов инструкция по применению отзывы
  • Скамья прямая лотос инструкция по сборке
  • Тофизопам инструкция по применению цена отзывы аналоги таблетки цена
  • Инструкция по охране труда для гостей на производстве