Differences and Connections Between CMake, NMake, and QMake

Differences and Connections Between CMake, NMake, and QMake

This article is reproduced from Zhihu, the link and author information are as follows. Author: Hui Chang Ge Link: https://www.zhihu.com/question/27455963/answer/89770919 Source: Zhihu Copyright belongs to the author. For commercial reproduction, please contact the author for authorization, and for non-commercial reproduction, please indicate the source. I often forget these concepts, even after reading them several times, … 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

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 Module Detailed Explanation: Mastering Usage and Custom Modules

CMake Module Detailed Explanation: Mastering Usage and Custom Modules

1. Introduction This article will focus on the usage of system-defined Find modules and how to write your own Find modules. The system provides various other modules, which generally need to be explicitly called using the INCLUDE directive. The FIND_PACKAGE directive is a special case that can directly invoke predefined modules. In fact, managing a … Read more

Advanced CMake Practices and Common Issues

Advanced CMake Practices and Common Issues

Today, we will delve into two heavyweight topics: package management installation configuration and best practices along with common issues. Have you also encountered these situations: Wrote a fantastic library but don’t know how to let others use it elegantly; After sharing the project, others always complain about “missing dependencies”; Clearly configured CMakeLists.txt, yet still falls … Read more

CMake Template for Simple Projects

CMake Template for Simple Projects

CMake can be seen as a tool for automatically generating Makefiles, but it is actually a programming language with a scripting style: Cross-platform support: CMake supports multiple operating systems and compilers, allowing the same build configuration to be used in different environments. Simplified configuration: Through the CMakeLists.txt file, users can define project structure, dependencies, compilation … Read more

CMake Practical Guide (Part One)

CMake Practical Guide (Part One)

Click the blue text above to follow us Introduction Previously, we introduced the use of Autotools; today we will look at how to use CMake. CMake is a project build tool, similar to Autotools. It can be simply understood as a tool that helps us generate Makefiles for easier compilation. Usage Example (1) Create main.c, … Read more