CMake Project Management: From Beginner to Expert

CMake Project Management: From Beginner to Expert

Hello everyone! Today I want to share a very practical topic – CMake project management. As a veteran C++ developer with over ten years of experience, I know how important a good build system is in large project development. CMake is such a powerful tool that helps us manage code dependencies and configure compilation options, … Read more

CMake Tutorial: Building C/C++ Projects with Different Generators

CMake Tutorial: Building C/C++ Projects with Different Generators

For CMake, I had always understood it to be a project build tool, until I encountered –build and realized that CMake also unifies the compilation phase across different platforms. To understand CMake‘s build and compile process, one must first understand generators. 1. Generators The CMake generator is responsible for writing input files for the underlying … Read more

Master CMake for Building Static and Dynamic Libraries

Master CMake for Building Static and Dynamic Libraries

1. Task Explain the process of building static and dynamic libraries with CMake in a simple and understandable way using examples. Tasks: Create a static library and a dynamic library, providing the HelloFunc function for use in other programs, which outputs the string ‘Hello World!’ to the terminal. Install header files and shared libraries. Write … Read more

Quick Start Guide to CMake

Quick Start Guide to CMake

Link: https://www.hahack.com/codes/cmake/ Recommended: Hello Series | CMake Brief Basics What is CMake You may have heard of several Make tools, such as GNU Make, QT’s qmake, Microsoft’s MS nmake, BSD Make (pmake), Makepp, etc. These Make tools follow different specifications and standards, and the Makefile formats they execute vary widely. This brings a serious problem: … Read more

Overview of Common CMake Commands: Essential Project Management Insights

Overview of Common CMake Commands: Essential Project Management Insights

1. Introduction CMake is much simpler than autotools. Next, let’s take a closer look at the common commands provided by CMake. In previous articles, we have discussed many command usages such as PROJECT, ADD_EXECUTABLE, INSTALL, ADD_SUBDIRECTORY, SUBDIRS, INCLUDE_DIRECTORIES, LINK_DIRECTORIES, TARGET_LINK_LIBRARIES, and SET. This section introduces more CMake commands, arranged in the order of the CMake … Read more

Mastering GNU Make: From Beginner to Expert

GNU Make: From Beginner to Expert Translated from: https://interrupt.memfault.com/blog/gnu-make-guidelines GNU Make is a popular and commonly used program for building C language software. It is used to build the Linux kernel and other commonly used GNU/Linux programs and software libraries. Most embedded software developers will use GNU Make at some point in their careers, either … Read more

Quick Start Guide to Makefile

Quick Start Guide to Makefile

1. Quick Start Guide to Makefile The goal of this article is to help you write simple Makefiles and understand common Makefiles. Make is an old build tool, which is incredible in today’s rapidly evolving technology landscape. Make plays a significant role in large software projects. I first encountered it while learning the Linux kernel, … Read more

In-Depth Analysis of CMake Build Process: From Fundamentals to Complex Projects

In-Depth Analysis of CMake Build Process: From Fundamentals to Complex Projects

1. Analysis of the Project Structure After CMake Build 1.1 Directory Structure After CMake Build After CMake build is complete, a directory named build will be generated in the root directory of the project. This directory is where all intermediate files and final target files generated during the CMake build process are stored. Below, we … Read more

A Concise Guide to Makefile in Chip Design

A Concise Guide to Makefile in Chip Design

What can Makefile do? Makefile can execute commands based on specified dependency rules and whether files have been modified. It is commonly used to compile software source code, only recompiling modified files, which significantly speeds up the compilation process. The Basic Format of Makefile Target: Dependencies Command The target is the result to be generated, … Read more