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

CMake Tutorial: Build and Link Libraries

CMake Tutorial: Build and Link Libraries

# Specify Minimum Version, Not Required cmake_minimum_required(VERSION 3.2) # Project Name project(chat) # Define the Executable File Generated by This Project #add_executable(ExecutableName SourceFileName.c) add_executable(chat_app) # When there are many files, define the file names as variables #set(VariableName SourceFile) set(SRC_LIST add.cpp div.cpp main.cpp mult.cpp sub.cpp) #add_executable(ExecutableName SourceFiles) Use $ as a value symbol and wrap variables … Read more

CMake: Installing a Project

CMake: Installing a Project

Introduction: This note will introduce some basic concepts through a small project, which will also be used in later notes. Installing files, libraries, and executables is a very basic task, but it can also bring some issues. This note demonstrates how to effectively avoid these problems using CMake. ✦ Project Structure ✦ ├── CMakeLists.txt ├── … Read more

Recommended Mainstream PC Configurations for the Wan Jia Aluminum Mini Case

Recommended Mainstream PC Configurations for the Wan Jia Aluminum Mini Case

Recently, some fans have shown interest in a compact mini case – the Wan Jia Aluminum Element, and they want us to propose several mainstream computer configuration solutions for this case. The budget for the computer host is around 5000-6000 yuan, suitable for gaming and light productivity needs, while pursuing cost-effectiveness. Wan Jia Aluminum Element … Read more