Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Modern CMake for C++
Modern CMake for C++

Modern CMake for C++: Discover a better approach to building, testing, and packaging your software

eBook
€20.29 €28.99
Paperback
€35.99
Paperback
€37.99
Subscription
Free Trial
Renews at €18.99p/m

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
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Modern CMake for C++

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand and automate compilation and linking with CMake
  • Manage internal and external dependencies easily
  • Add quality checks and tests as an inherent step for your builds

Description

Creating top-notch software is an extremely difficult undertaking. Developers researching the subject have difficulty determining which advice is up to date and which approaches have already been replaced by easier, better practices. At the same time, most online resources offer limited explanation, while also lacking the proper context and structure. This book offers a simpler, more comprehensive, experience as it treats the subject of building C++ solutions holistically. Modern CMake for C++ is an end-to-end guide to the automatization of complex tasks, including building, testing, and packaging. You'll not only learn how to use the CMake language in CMake projects, but also discover what makes them maintainable, elegant, and clean. The book also focuses on the structure of source directories, building targets, and packages. As you progress, you’ll learn how to compile and link executables and libraries, how those processes work, and how to optimize builds in CMake for the best results. You'll understand how to use external dependencies in your project – third-party libraries, testing frameworks, program analysis tools, and documentation generators. Finally, you'll get to grips with exporting, installing, and packaging for internal and external purposes. By the end of this book, you’ll be able to use CMake confidently on a professional level.

Who is this book for?

The book is for build engineers and software developers with knowledge of C/C++ programming who are looking to learn CMake to automate the process of building small and large software solutions. If you are someone who's just getting started with CMake, a long-time GNU Make user, or simply looking to brush up on the latest best practices, this book is for you.

What you will learn

  • Understand best practices for building C++ code
  • Gain practical knowledge of the CMake language by focusing on the most useful aspects
  • Use cutting-edge tooling to guarantee code quality with the help of tests and static and dynamic analysis
  • Discover how to manage, discover, download, and link dependencies with CMake
  • Build solutions that can be reused and maintained in the long term
  • Understand how to optimize build artifacts and the build process itself

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Feb 28, 2022
Length: 460 pages
Edition : 1st
Language : English
ISBN-13 : 9781801071659
Category :
Tools :

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
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Feb 28, 2022
Length: 460 pages
Edition : 1st
Language : English
ISBN-13 : 9781801071659
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 116.97
C++20 STL Cookbook
€35.99
Modern CMake for C++
€35.99
C++ High Performance
€44.99
Total 116.97 Stars icon

Table of Contents

16 Chapters
Section 1: Introducing CMake Chevron down icon Chevron up icon
Chapter 1: First Steps with CMake Chevron down icon Chevron up icon
Chapter 2: The CMake Language Chevron down icon Chevron up icon
Chapter 3: Setting Up Your First CMake Project Chevron down icon Chevron up icon
Section 2: Building With CMake Chevron down icon Chevron up icon
Chapter 4: Working with Targets Chevron down icon Chevron up icon
Chapter 5: Compiling C++ Sources with CMake Chevron down icon Chevron up icon
Chapter 6: Linking with CMake Chevron down icon Chevron up icon
Chapter 7: Managing Dependencies with CMake Chevron down icon Chevron up icon
Section 3: Automating With CMake Chevron down icon Chevron up icon
Chapter 8: Testing Frameworks Chevron down icon Chevron up icon
Chapter 9: Program Analysis Tools Chevron down icon Chevron up icon
Chapter 10: Generating Documentation Chevron down icon Chevron up icon
Chapter 11: Installing and Packaging Chevron down icon Chevron up icon
Chapter 12: Creating Your Professional Project Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(21 Ratings)
5 star 57.1%
4 star 19%
3 star 9.5%
2 star 9.5%
1 star 4.8%
Filter icon Filter
Top Reviews

Filter reviews by




Devinder May 07, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Packt asked me to review a book on CMAKE for them, which, honestly, I wasn’t expecting, because I gave the last book they asked me to review, a 3 out of 5 (I promise it was fair). The book today is: Modern CMake for C++, by Rafal Swidzinski.The short version of my review is:If you are getting started with CMAKE or just don’t feel confident about your knowledge, get this book. It is a solid 5/5.A bit about me: I started using CMAKE in some capacity in 2019. Since then, I’ve had to grow into learning a bit more about it, because turns out that a good CMAKE strategy that uses a modern approach, is important if you want less pain in your complex C++ projects.I own a copy of the professional CMAKE book. I’ve gone through the various adoption strategies that have evolved recently and become talks or articles. I occasionally stalk slack channels like CppLang to learn as much as I can from the heavy weights. I developed the CMAKE strategy at Ebots, and have been fairly involved in making sure the code build/installs/updates become relatively painless.More on the book:I think Rafal Swidzinski's book condenses everything you need to know about CMAKE and does it well. His approach is clear, and practical.For beginners, who are just starting their search on getting started, the first seven chapters will walk you through the basics and make you capable of writing manageable software with CMAKE.If you feel somewhat comfortable with CMAKE already but aren’t too sold on the Testing/Installing bits of it, you will get a practical guide on that in the last few chapters. The final project, if you follow through with it, has all the supporting tools you need to be successful. There’s also his source code in github.Far as I know, I don't get any money if you buy it =) , or at least haven't seen any ::hmpfh:: Though I did get a copy of the book to review. Note that the amazon review is pretty identical to my review on linkedin.
Amazon Verified review Amazon
H Zhu Apr 06, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book covers the basics and advanced usage of CMake. I really like the book with high-level diagrams and detailed examples, that well explains the usage of CMake, the concepts behind it, and the best practices. And I enjoyed the flow of the book, from basic concepts to advanced topics like how CMake can work with different platforms, protobuf, docker, GitHub, testing and performance analysis etc.
Amazon Verified review Amazon
GFisher Nov 15, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Can't recommend this book enough. After working as an embedded software developer for over a year without any formal training on C++ or CMake, I've constantly finding myself fighting tooth and nail against our build system. It's been a long, frustrating experience to ssy the least. Due to the senior team members I work closely with being stubborn in their ways, and obsessed with meeting deadlines (which we have been consistently missing by the way), I've been met with nothing but push-back when expressing the desire fir formal training on the technology none of us know how to use. I finally got fed up enough to buy and read this in my free time. It has been a life saver! Any professional using CMake needs to learn how it works from the basics to the advanced level, and how to use it the right way, if they are to be of any value to their employer and/or coworkers.
Amazon Verified review Amazon
MoA Mar 18, 2022
Full star icon Full star icon Full star icon Full star icon Full star icon 5
There exists a wide chasm between knowledge of C++ as a language, and being able to write production ready software in C++. “Modern CMake for C++” bridges this chasm for you in a step-by-step, easy to understand manner.The book not only covers CMake’s unusual syntax; but also thoroughly explores important topics such as managing external dependencies, automated testing, and building portable cross-platform code.I especially loved the author’s focus on a hands-on approach to teaching. Associating concepts taught in the book with practical examples helped clarify all ambiguities, and made the entire process that much more enjoyable.Whether you’re a beginner in C++ seeking to advance in your career, or a seasoned engineer looking to squeeze all the value you can get out of CMake (trust me, it can do *alot* for you!), you will undoubtedly benefit from this work.
Amazon Verified review Amazon
Taruchu Jun 17, 2023
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Chapters were very easy to read and all examples where thorough, thank you and God Bless 🙏🏽💕
Amazon Verified review Amazon
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.

Modal Close icon
Modal Close icon