Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
$9.99 | ALL EBOOKS & VIDEOS
Over 7,000 tech titles at $9.99 each with AI-powered learning assistants on new releases
CMake Best Practices
CMake Best Practices

CMake Best Practices: Discover proven techniques for creating and maintaining programming projects with CMake

By Dominik Berner , Mustafa Kemal Gilor
$37.99 $9.99
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (1 Ratings)
Book May 2022 406 pages 1st Edition
eBook
$37.99 $9.99
Print
$46.99
Subscription
$15.99 Monthly
eBook
$37.99 $9.99
Print
$46.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 27, 2022
Length 406 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781803239729
Category :
Table of content icon View table of contents Preview book icon Preview Book

CMake Best Practices

Part 1: The Basics

In the first chapter, you will learn how to invoke CMake and get a high-level overview of its basic concepts, as well as a brief introduction to the CMake language.

The second chapter will be about using CMake from the command line, as a GUI, or in various IDEs and editors. It will illustrate how to change various configuration options and select different compilers.

In the third chapter, we will cover creating a simple CMake project to build executables and libraries.

This part contains the following chapters:

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand what CMake is, how it works, and how to interact with it
  • Discover how to properly create and maintain well-structured CMake projects
  • Explore tools and techniques to get the most out of your CMake project

Description

CMake is a powerful tool used to perform a wide variety of tasks, so finding a good starting point for learning CMake is difficult. This book cuts to the core and covers the most common tasks that can be accomplished with CMake without taking an academic approach. While the CMake documentation is comprehensive, it is often hard to find good examples of how things fit together, especially since there are lots of dirty hacks and obsolete solutions available on the internet. This book focuses on helping you to tie things together and create clean and maintainable projects with CMake. You'll not only get to grips with the basics but also work through real-world examples of structuring large and complex maintainable projects and creating builds that run in any programming environment. You'll understand the steps to integrate and automate various tools for improving the overall software quality, such as testing frameworks, fuzzers, and automatic generation of documentation. And since writing code is only half of the work, the book also guides you in creating installers and packaging and distributing your software. All this is tailored to modern development workflows that make heavy use of CI/CD infrastructure. By the end of this CMake book, you'll be able to set up and maintain complex software projects using CMake in the best way possible.

What you will learn

Get to grips with architecting a well-structured CMake project Modularize and reuse CMake code across projects Integrate various tools for static analysis, linting, formatting, and documentation into a CMake project Get hands-on with performing cross-platform builds Discover how you can easily use different toolchains with CMake Get started with crafting a well-defined and portable build environment for your project

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 27, 2022
Length 406 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781803239729
Category :

Table of Contents

22 Chapters
Preface Chevron down icon Chevron up icon
1. Part 1: The Basics Chevron down icon Chevron up icon
2. Chapter 1: Kickstarting CMake Chevron down icon Chevron up icon
3. Chapter 2: Accessing CMake in Best Ways Chevron down icon Chevron up icon
4. Chapter 3: Creating a CMake Project Chevron down icon Chevron up icon
5. Part 2: Practical CMake – Getting Your Hands Dirty with CMake Chevron down icon Chevron up icon
6. Chapter 4: Packaging, Deploying, and Installing a CMake Project Chevron down icon Chevron up icon
7. Chapter 5: Integrating Third-Party Libraries and Dependency Management Chevron down icon Chevron up icon
8. Chapter 6: Automatically Generating Documentation with CMake Chevron down icon Chevron up icon
9. Chapter 7: Seamlessly Integrating Code Quality Tools with CMake Chevron down icon Chevron up icon
10. Chapter 8: Executing Custom Tasks with CMake Chevron down icon Chevron up icon
11. Chapter 9: Creating Reproducible Build Environments Chevron down icon Chevron up icon
12. Chapter 10: Handling Big Projects and Distributed Repositories in a Superbuild Chevron down icon Chevron up icon
13. Chapter 11: Automated Fuzzing with CMake Chevron down icon Chevron up icon
14. Part 3: Mastering the Details Chevron down icon Chevron up icon
15. Chapter 12: Cross-Platform Compiling and Custom Toolchains Chevron down icon Chevron up icon
16. Chapter 13: Reusing CMake Code Chevron down icon Chevron up icon
17. Chapter 14: Optimizing and Maintaining CMake Projects Chevron down icon Chevron up icon
18. Chapter 15: Migrating to CMake Chevron down icon Chevron up icon
19. Chapter 16: Contributing to CMake and Further Reading Material Chevron down icon Chevron up icon
20. Assessments Chevron down icon Chevron up icon
21. Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(1 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


Salim Pamukcu Jan 19, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
detailed, clean, updated information with examples
Feefo Verified review Feefo image
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.