Minimal CMake


Book Description

Design, build, and share cross-platform software effortlessly, and enhance your development workflow with this hands-on guide Key Features Unlock efficient cross-platform builds with streamlined CMake setups Learn CMake's most powerful features for streamlined software development from a seasoned game and engine developer Create and distribute an application with step-by-step instructions, practical examples, and working code Purchase of the print or Kindle book includes a free PDF eBook Book DescriptionMinimal CMake guides you through creating a CMake project one step at a time. The book utilizes the author's unique expertise in game and engine development to craft compelling examples of how CMake can be used to build complex software. The chapters introduce concepts gradually, each one building on the last. Throughout the course of the book, you will progress from a simple console application all the way through to a full windowed app. The book will help you build a strong foundation in CMake that will translate to future projects. You'll learn how to integrate existing software libraries to enhance your app's functionality, how to build reusable libraries to share with others, and how to manage developing for multiple platforms simultaneously, including macOS, Windows, and Linux. You'll also find out how CMake facilitates testing and how to package your application ready for distribution. The book aims to not overwhelm you with everything there is to know about CMake. Instead, it focuses on the most relevant and important parts that will help you become productive quickly. By the end of this book, you will be a confident CMake user and will have gained the skills and experience to build and share your own libraries and applications.What you will learn Set up projects for seamless cross-platform development Integrate external libraries to enhance your project's functionality Create and share reusable libraries Manage complex software dependencies for improved maintainability Package and distribute applications efficiently Utilize top tools to streamline your CMake workflow Explore resources for continuous learning Who this book is for If you are a programmer skilled in C, C++, Swift, Objective-C, or C#, and keen on cross-platform development and open-source software, this book is for you. A solid grasp of CMake helps you to effectively utilize and create open-source libraries and applications. No prior knowledge of CMake is necessary, though familiarity with an imperative programming language (especially C and C++) is beneficial. While a basic understanding of the terminal is advantageous, comprehensive setup instructions will guide you across Windows, macOS, and Linux (Ubuntu).




CMake Best Practices


Book Description

Discover practical tips and techniques for leveraging CMake to optimize your software development workflow Key Features Learn Master CMake, from basics to advanced techniques, for seamless project management Gain practical insights and best practices to tackle real-world CMake challenges Implement advanced strategies for optimizing and maintaining large-scale CMake projects Purchase of the print or Kindle book includes a free PDF eBook Book Description Discover the cutting-edge advancements in CMake with the new edition of CMake Best Practices. This book focuses on real-world applications and techniques to leverage CMake, avoiding outdated hacks and overwhelming documentation. You’ll learn how to use CMake presets for streamlined project configurations and embrace modern package management with Conan 2.0. Covering advanced methods to integrate third-party libraries and optimize cross-platform builds, this updated edition introduces new tools and techniques to enhance software quality, including testing frameworks, fuzzers, and automated documentation generation. Through hands-on examples, you’ll become proficient in structuring complex projects, ensuring that your builds run smoothly across different environments. Whether you’re integrating tools for continuous integration or packaging software for distribution, this book equips you with the skills needed to excel in modern software development. By the end of the book, you’ll have mastered setting up and maintaining robust software projects using CMake to streamline your development workflow and produce high-quality software. What you will learn Architect a well-structured CMake project Modularize and reuse CMake code across projects Use the latest CMake features for presets and dependency management Integrate tools for static analysis, linting, formatting, and documentation into a CMake project Execute hands-on cross-platform builds and seamless toolchain integration Implement automated fuzzing techniques to enhance code robustness Streamline your CI/CD pipelines with effective CMake configurations Craft a well-defined and portable build environment for your project Who this book is for This book is for software engineers and build system maintainers working with C or C++ who want to optimize their workflow using CMake. It's also valuable for those looking to enhance their understanding of structuring and managing CMake projects efficiently. Basic knowledge of C++ and general programming is recommended to fully grasp the examples and techniques covered in the book.




CMake Cookbook


Book Description

Learn CMake through a series of task-based recipes that provide you with practical, simple, and ready-to-use CMake solutions for your code Key FeaturesLearn to configure, build, test, and package software written in C, C++, and FortranProgress from simple to advanced tasks with examples tested on Linux, macOS, and WindowsManage code complexity and library dependencies with reusable CMake building blocksBook Description CMake is cross-platform, open-source software for managing the build process in a portable fashion. This book features a collection of recipes and building blocks with tips and techniques for working with CMake, CTest, CPack, and CDash. CMake Cookbook includes real-world examples in the form of recipes that cover different ways to structure, configure, build, and test small- to large-scale code projects. You will learn to use CMake's command-line tools and master modern CMake practices for configuring, building, and testing binaries and libraries. With this book, you will be able to work with external libraries and structure your own projects in a modular and reusable way. You will be well-equipped to generate native build scripts for Linux, MacOS, and Windows, simplify and refactor projects using CMake, and port projects to CMake. What you will learnConfigure, build, test, and install code projects using CMakeDetect operating systems, processors, libraries, files, and programs for conditional compilationIncrease the portability of your codeRefactor a large codebase into modules with the help of CMakeBuild multi-language projectsKnow where and how to tweak CMake configuration files written by somebody elsePackage projects for distributionPort projects to CMakeWho this book is for If you are a software developer keen to manage build systems using CMake or would like to understand and modify CMake code written by others, this book is for you. A basic knowledge of C++, C, or Fortran is required to understand the topics covered in this book.




Modern CMake for C++


Book Description

Write comprehensive, professional-standard CMake projects and ensure the quality and simplicity of your solutions Purchase of the print or Kindle book includes a free eBook in the PDF format Key FeaturesUnderstand and automate compilation and linking with CMakeManage internal and external dependencies easilyAdd quality checks and tests as an inherent step for your buildsBook 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 learnUnderstand best practices for building C++ codeGain practical knowledge of the CMake language by focusing on the most useful aspectsUse cutting-edge tooling to guarantee code quality with the help of tests and static and dynamic analysisDiscover how to manage, discover, download, and link dependencies with CMakeBuild solutions that can be reused and maintained in the long termUnderstand how to optimize build artifacts and the build process itselfWho 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.




Modern CMake for C++


Book Description

Gain proficiency in CMake and unlock the complete potential of C++ to develop exceptional projects Purchase of the print or Kindle book includes a free eBook in the PDF format Key Features Get to grips with CMake and take your C++ development skills to enterprise standards Use hands-on exercises and self-assessment questions to lock-in your learning Understand how to build in an array of quality checks and tests for robust code Book DescriptionModern CMake for C++ isn't just another reference book, or a repackaging of the documentation, but a blueprint to bridging the gap between learning C++ and being able to use it in a professional setting. It's an end-to-end guide to the automation of complex tasks, including building, testing, and packaging software. This second edition is significantly rewritten, restructured and refreshed with latest additions to CMake, such as support of C++20 Modules. In this book, you'll not only learn how to use the CMake language in CMake projects but also discover how to make those projects maintainable, elegant, and clean. As you progress, you'll dive into the structure of source directories, building targets, and packages, all while learning how to compile and link executables and libraries. You'll also gain a deeper understanding of how those processes work and how to optimize builds in CMake for the best results. You'll discover how to use external dependencies in your project – third-party libraries, testing frameworks, program analysis tools, and documentation generators. Finally, you'll gain profi ciency in exporting, installing, and packaging for internal and external purposes. By the end of this book, you'll be able to use CMake confi dently at a professional level.What you will learn Understand best practices to build ++ code Gain practical knowledge of the CMake language Guarantee code quality with 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 Program modern CMake and manage your build processes Acquire expertise in complex subjects such as CMake presets 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’re 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.




A Systematic Approach to Learning Robot Programming with ROS


Book Description

A Systematic Approach to Learning Robot Programming with ROS provides a comprehensive, introduction to the essential components of ROS through detailed explanations of simple code examples along with the corresponding theory of operation. The book explores the organization of ROS, how to understand ROS packages, how to use ROS tools, how to incorporate existing ROS packages into new applications, and how to develop new packages for robotics and automation. It also facilitates continuing education by preparing the reader to better understand the existing on-line documentation. The book is organized into six parts. It begins with an introduction to ROS foundations, including writing ROS nodes and ROS tools. Messages, Classes, and Servers are also covered. The second part of the book features simulation and visualization with ROS, including coordinate transforms. The next part of the book discusses perceptual processing in ROS. It includes coverage of using cameras in ROS, depth imaging and point clouds, and point cloud processing. Mobile robot control and navigation in ROS is featured in the fourth part of the book The fifth section of the book contains coverage of robot arms in ROS. This section explores robot arm kinematics, arm motion planning, arm control with the Baxter Simulator, and an object-grabber package. The last part of the book focuses on system integration and higher-level control, including perception-based and mobile manipulation. This accessible text includes examples throughout and C++ code examples are also provided at https://github.com/wsnewman/learning_ros




Introduction to Scientific and Technical Computing


Book Description

Created to help scientists and engineers write computer code, this practical book addresses the important tools and techniques that are necessary for scientific computing, but which are not yet commonplace in science and engineering curricula. This book contains chapters summarizing the most important topics that computational researchers need to know about. It leverages the viewpoints of passionate experts involved with scientific computing courses around the globe and aims to be a starting point for new computational scientists and a reference for the experienced. Each contributed chapter focuses on a specific tool or skill, providing the content needed to provide a working knowledge of the topic in about one day. While many individual books on specific computing topics exist, none is explicitly focused on getting technical professionals and students up and running immediately across a variety of computational areas.




Developing IoT Projects with ESP32


Book Description

From smart sensors to cloud integration and the world of TinyML, this book is your comprehensive guide to the IoT ecosystem, using the ESP32 and industry-standard tools and technologies Key Features Build IoT projects from scratch using ESP32 Customize solutions, take them to cloud, visualize real-time data, implement security features Practice using a variety of hands-on projects such as an audio player, smart home, and more Book DescriptionESP32, a low-cost and energy-efficient system-on-a-chip microcontroller, has become the backbone of numerous WiFi devices, fueling IoT innovation. This book offers a holistic approach to building an IoT system from the ground up, ensuring secure data communication from sensors to cloud platforms, empowering you to create production-grade IoT solutions using the ESP32 SoC. Starting with IoT essentials supported by real-world use cases, this book takes you through the entire process of constructing an IoT device using ESP32. Each chapter introduces new dimensions to your IoT applications, covering sensor communication, the integration of prominent IoT libraries like LittleFS and LVGL, connectivity options via WiFi, security measures, cloud integration, and the visualization of real-time data using Grafana. Furthermore, a dedicated section explores AI/ML for embedded systems, guiding you through building and running ML applications with tinyML and ESP32-S3 to create state-of-the-art embedded products. This book adopts a hands-on approach, ensuring you can start building IoT solutions right from the beginning. Towards the end of the book, you'll tackle a full-scale Smart Home project, applying all the techniques you've learned in real-time. Embark on your journey to build secure, production-grade IoT systems with ESP32 today!What you will learn Explore ESP32 with IDE and debugging tools for effective IoT creation Drive GPIO, I2C, multimedia, and storage for seamless integration of external devices Utilize handy IoT libraries to enhance your ESP32 projects Manage WiFi like a pro with STA & AP modes, provisioning, and ESP Rainmaker framework features Ensure robust IoT security with secure boot and OTA firmware updates Harness AWS IoT for data handling and achieve stunning visualization using Grafana Enhance your projects with voice capabilities using ESP AFE and Speech Recognition Innovate with tinyML on ESP32-S3 and the Edge Impulse platform Who this book is forIf you are an embedded software developer, an IoT software architect or developer, a technologist, or anyone who wants to learn how to use ESP32 and its applications, this book is for you. A basic understanding of embedded systems, programming, networking, and cloud computing concepts is necessary to get started with the book.




Learn LLVM 12


Book Description

Learn how to build and use all parts of real-world compilers, including the frontend, optimization pipeline, and a new backend by leveraging the power of LLVM core libraries Key Features Get to grips with effectively using LLVM libraries step-by-step Understand LLVM compiler high-level design and apply the same principles to your own compiler Use compiler-based tools to improve the quality of code in C++ projects Book DescriptionLLVM was built to bridge the gap between compiler textbooks and actual compiler development. It provides a modular codebase and advanced tools which help developers to build compilers easily. This book provides a practical introduction to LLVM, gradually helping you navigate through complex scenarios with ease when it comes to building and working with compilers. You’ll start by configuring, building, and installing LLVM libraries, tools, and external projects. Next, the book will introduce you to LLVM design and how it works in practice during each LLVM compiler stage: frontend, optimizer, and backend. Using a subset of a real programming language as an example, you will then learn how to develop a frontend and generate LLVM IR, hand it over to the optimization pipeline, and generate machine code from it. Later chapters will show you how to extend LLVM with a new pass and how instruction selection in LLVM works. You’ll also focus on Just-in-Time compilation issues and the current state of JIT-compilation support that LLVM provides, before finally going on to understand how to develop a new backend for LLVM. By the end of this LLVM book, you will have gained real-world experience in working with the LLVM compiler development framework with the help of hands-on examples and source code snippets.What you will learn Configure, compile, and install the LLVM framework Understand how the LLVM source is organized Discover what you need to do to use LLVM in your own projects Explore how a compiler is structured, and implement a tiny compiler Generate LLVM IR for common source language constructs Set up an optimization pipeline and tailor it for your own needs Extend LLVM with transformation passes and clang tooling Add new machine instructions and a complete backend Who this book is for This book is for compiler developers, enthusiasts, and engineers who are new to LLVM and are interested in learning about the LLVM framework. It is also useful for C++ software engineers looking to use compiler-based tools for code analysis and improvement, as well as casual users of LLVM libraries who want to gain more knowledge of LLVM essentials. Intermediate-level experience with C++ programming is mandatory to understand the concepts covered in this book more effectively.




Beginning Sensor Networks with XBee, Raspberry Pi, and Arduino


Book Description

Build sensor networks with Python and MicroPython using XBee radio modules, Raspberry Pi, and Arduino boards. This revised and updated edition will put all of these together to form a sensor network, and show you how to turn your Raspberry Pi into a MySQL database server to store your sensor data! You'll review the different types of sensors and sensor networks, along with new technology, including how to build a simple XBee network. You'll then walk through building an sensor nodes on the XBee, Raspberry Pi, and Arduino, and also learn how to collect data from multiple sensor nodes. The book also explores different ways to store sensor data, including writing to an SD card, sending data to the cloud, and setting up a Raspberry Pi MySQL server to host your data. You'll even learn how to connect to and interact with a MySQL database server directly from an Arduino! Finally you'll see how to put it all together by connecting your sensor nodes to your new Raspberry Pi database server. If you want to see how well XBee, Raspberry Pi, and Arduino can get along, especially to create a sensor network, then Beginning Sensor Networks with XBee, Raspberry Pi, and Arduino is just the book you need. What You'll LearnCode your sensor nodes with Python and MicroPython Work with new XBee 3 modulesHost your data on Raspberry PiGet started with MySQLCreate sophisticated sensor networks Who This Book Is For Those interested in building or experimenting with sensor networks and IoT solutions, including those with little or no programming experience. A secondary target includes readers interested in using XBee modules with Raspberry Pi and Arduino, those interested in controlling XBee modules with MicroPython.