Modern CMake for C++: Discover a better approach to building, testing, and packaging your software (Paperback)
暫譯: 現代 CMake 用於 C++:探索更佳的軟體建構、測試與打包方法 (平裝本)

Rafal Swidzinski

買這商品的人也買了...

相關主題

商品描述

Key Features

  • 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

Book 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.

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

Who this book is 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.

商品描述(中文翻譯)

**主要特點**

- 理解並自動化使用 CMake 的編譯和連結
- 輕鬆管理內部和外部依賴
- 將質量檢查和測試作為構建的固有步驟

**書籍描述**

創建高品質的軟體是一項極具挑戰性的任務。研究這個主題的開發者在判斷哪些建議是最新的,哪些方法已被更簡單、更好的實踐取代時,常常感到困難。同時,大多數線上資源提供的解釋有限,且缺乏適當的上下文和結構。

本書提供了一個更簡單、更全面的體驗,因為它從整體上處理 C++ 解決方案的構建主題。《現代 CMake for C++》是一本關於自動化複雜任務的端到端指南,包括構建、測試和打包。您不僅會學習如何在 CMake 專案中使用 CMake 語言,還會發現使其可維護、優雅和乾淨的要素。本書還專注於源目錄的結構、構建目標和包。在進展過程中,您將學習如何編譯和連結可執行檔和庫,這些過程是如何運作的,以及如何在 CMake 中優化構建以獲得最佳結果。您將理解如何在專案中使用外部依賴——第三方庫、測試框架、程式分析工具和文檔生成器。最後,您將掌握內部和外部目的的導出、安裝和打包。

在本書結束時,您將能夠在專業層面上自信地使用 CMake。

**您將學到的內容**

- 理解構建 C++ 代碼的最佳實踐
- 通過專注於最有用的方面,獲得 CMake 語言的實用知識
- 使用尖端工具,通過測試和靜態及動態分析來保證代碼質量
- 發現如何使用 CMake 管理、發現、下載和連結依賴
- 構建可以長期重用和維護的解決方案
- 理解如何優化構建產物和構建過程本身

**本書適合誰**

本書適合具有 C/C++ 編程知識的構建工程師和軟體開發者,他們希望學習 CMake 以自動化構建小型和大型軟體解決方案的過程。如果您是剛開始接觸 CMake 的人、長期使用 GNU Make 的用戶,或只是想更新最新的最佳實踐,本書都非常適合您。

作者簡介

Rafał Świdziński works as a staff engineer at Google. With over 10 years of professional experience as a full stack developer, he has been able to experiment with a vast multitude of programming languages and technologies. During this time, he has been building software under his own company and for corporations including Cisco Meraki, Amazon, and Ericsson. Originally from Łódź, Poland, he now lives in London, UK, from where he runs a YouTube channel, "Smok," discussing topics related to software development. He tackles technical problems, including real-life and work-related challenges encountered by many people in the field. Throughout his work, he explains the technical concepts in detail and demystifies the art and science behind the role of software engineer. His primary focus is on high-quality code and the craftsmanship of programming.

作者簡介(中文翻譯)

Rafał Świdziński 目前在 Google 擔任資深工程師。擁有超過 10 年的全端開發專業經驗,他能夠實驗多種程式語言和技術。在這段時間內,他為自己的公司以及包括 Cisco Meraki、Amazon 和 Ericsson 等企業開發軟體。Rafał 來自波蘭的 Łódź,現在居住在英國倫敦,並在那裡經營一個名為「Smok」的 YouTube 頻道,討論與軟體開發相關的主題。他解決技術問題,包括許多人在該領域遇到的現實生活和工作相關挑戰。在他的工作中,他詳細解釋技術概念,並揭開軟體工程師角色背後的藝術和科學的神秘面紗。他的主要重點是高品質的程式碼和程式設計的工藝。

目錄大綱

Table of Contents

  1. First Steps with CMake
  2. The CMake Language
  3. Setting Up Your First CMake Project
  4. Working with Targets
  5. Compiling C++ Sources with CMake
  6. Linking with CMake
  7. Managing Dependencies with CMake
  8. Testing Frameworks
  9. Program Analysis Tools
  10. Generating Documentation
  11. Installing and Packaging
  12. Creating Your Professional Project
  13. Appendix Miscellaneous Commands

目錄大綱(中文翻譯)

Table of Contents


  1. First Steps with CMake

  2. The CMake Language

  3. Setting Up Your First CMake Project

  4. Working with Targets

  5. Compiling C++ Sources with CMake

  6. Linking with CMake

  7. Managing Dependencies with CMake

  8. Testing Frameworks

  9. Program Analysis Tools

  10. Generating Documentation

  11. Installing and Packaging

  12. Creating Your Professional Project

  13. Appendix Miscellaneous Commands