Getting Started with CMake: HelloWorld Bin

Getting Started with CMake: HelloWorld Bin

Starting a new series on CMake today, the latest release is on the platform, welcome to join and get first-hand resources. Each issue will be driven by examples and directories, learning step by step, feel free to bookmark and share. Generating Executable Files Assuming we only have a .cc file. Create a CMakeLists.txt file in … Read more

CMake Practical Tutorial (Part 2)

CMake Practical Tutorial (Part 2)

Introduction From the previous article, I believe everyone has understood what CMake is, but it’s not something you can master just by looking at it; you need to practice in order to learn it. If you have already practiced, you will realize how difficult it is to use the content from the last article in … Read more

CMake Configuration Files in CLion

CMake Configuration Files in CLion

The settings required to build a CMake project are consolidated into a CMake configuration file. It includes the toolchain and build type, as well as CMake options such as generators and environment variables. You can configure multiple configuration files for a project to build targets with different compilers or different settings. To set up a … Read more

Makefile Supplement: A Comprehensive Guide

Makefile Supplement: A Comprehensive Guide

I looked at my article inventory, and it seems I don’t have an article about Makefile, so this one can fill that gap. Makefile Predefined Variables Predefined variables are system-provided variables. Predefined Variable Function AR Name of the library file maintenance program, default is ar AS Name of the assembler program, default is as CC … Read more

Basics of Makefile

Basics of Makefile

Lost Little Scholar Reading takes 4 minutes Speed reading only takes 2 minutes 1 Introduction The following C language code is very simple #include <stdio.h> int main(){ printf("Hello World!. "); return 0;} In Linux, we can compile it using the following command gcc hello.c -o hello However, as the project grows, there will inevitably be … Read more

ADC Build Strategies: The Most Brutal Setup Revealed!

ADC Build Strategies: The Most Brutal Setup Revealed!

WeChat ID: Miss_game The 6.9 patch has strengthened the Black Cleaver, unexpectedly making the Yomuu’s Ghostblade and Black Cleaver build extremely popular. Especially for Lucian, the combination of Yomuu’s and Black Cleaver allows him to slice through enemies like vegetables. The previous criticism that he couldn’t deal with tanks is no longer valid. But do … Read more

CMake: Splitting Source Code into Modules

CMake: Splitting Source Code into Modules

Introduction: Projects usually start with a single CMakeLists.txt file, which grows over time. In this article, we will demonstrate a mechanism to split the CMakeLists.txt into smaller units. The motivation for splitting CMakeLists.txt into modules: The main CMakeLists.txt is easier to read; CMake modules can be reused in other projects Combined with functions, modules can … Read more

Mastering CMake Basics: Practical Compilation from Scratch

Mastering CMake Basics: Practical Compilation from Scratch

1. Introduction to CMake CMake is a cross-platform installation (compilation) tool that can describe the installation (compilation process) for all platforms using simple statements. It can output various makefiles or project files, and can test the C++ features supported by the compiler, similar to automake under UNIX. The configuration file for CMake is named CMakeLists.txt. … Read more

CMake: Detecting Environment

CMake: Detecting Environment

Introduction: Through previous studies, we have mastered the basic knowledge of CMake and C++. Although CMake is cross-platform, sometimes the source code is not entirely portable. To ensure that our source code can be cross-platform, configuring and/or building the code according to different platforms is an essential part of the project build process. ✦ Detecting … Read more

Building Documentation with Doxygen Using CMake

Building Documentation with Doxygen Using CMake

Introduction: Documentation is essential for all software projects: For users, it is important to understand how to obtain and build the code, and how to effectively use the source code or library; For developers, documentation can describe the details of your source code and help other programmers contribute to the project. <span>Doxygen</span> is a very … Read more