Complete Guide to Modern CMake Configuration

Complete Guide to Modern CMake Configuration

📌Complete Guide to Modern CMake Configuration Table of Contents Basic Project Configuration C++ Standard Settings Compiler Options and Warning Configuration Output Directory Structure Management Environment Detection and Path Configuration Third-Party Dependency Management Target Linking and Visibility Installation Configuration and Deployment Custom Build Targets Complete Example Project Basic Project Configuration Minimum Version Requirement and Project Declaration … Read more

Practical Guide to GCC Link Time Optimization (LTO): Enhancing C++ Performance

Practical Guide to GCC Link Time Optimization (LTO): Enhancing C++ Performance

Introduction When optimizing the performance of C++ projects, we often enable -O2 or -O3 to enhance the compilation optimization level. However, many developers are unaware that GCC’s Link Time Optimization (LTO) is a powerful technique that breaks the boundaries of object files, enabling cross-file function inlining and the removal of unused code, further improving program … Read more

Struggling with Parallel Programming? CMake Provides a One-Click Solution!

Struggling with Parallel Programming? CMake Provides a One-Click Solution!

Click the blue text to follow the author 1. Introduction In the field of high-performance computing, parallel programming is crucial for fully leveraging the performance potential of modern computer hardware, especially multi-core processors and distributed computing clusters. OpenMP and MPI are two widely used parallel programming models, suitable for shared memory and distributed memory systems, … Read more

Struggling to Find Paths with CMake? The Find Family Commands Make It Easy!

Struggling to Find Paths with CMake? The Find Family Commands Make It Easy!

Click the blue text to follow the author 1. Introduction In complex software projects, dependency management is one of the core challenges during the build process. When we use CMake to build projects, we often need to introduce external libraries, header files, executables, or configuration files. Manually specifying the paths for these external dependencies can … Read more

Learning Open CASCADE | Compiling Source Code Based on Visual Studio 2022

Learning Open CASCADE | Compiling Source Code Based on Visual Studio 2022

Click the above “Mechanical and Electronic Engineering Technology” to follow us 1. Introduction The Open CASCADE (OCC) platform is a CAD/CAE/CAM software platform developed by the French company Matra Datavision, and it is one of the most important geometric modeling software platforms in the world. The open-source OCC object library is an object-oriented C++ library … Read more

When CMake Meets Python

When CMake Meets Python

CMake is not unfamiliar to many who are familiar with C and C++. Today, we will look at a somewhat unusual application scenario: using CMake to manage and run Python applications. This approach can be effective in certain situations, such as when code generation is done in C++, and tool scripts are written in Python, … Read more

Getting Started with CMake: From Basic C Code to Embedded Project Management

Getting Started with CMake: From Basic C Code to Embedded Project Management

Hello everyone, welcome to <span>LiXin Embedded</span>. Today we will talk about CMake, a powerful tool that makes cross-platform builds easy and helps you manage your projects efficiently. Why Do We Need CMake? If you are just starting to learn C++, you might be used to using an IDE like Visual Studio, VS Code, or CLion. … Read more

Compilation Tools: GCC, GNU, MinGW, MSVC, Make, CMake, Ninja

Compilation Tools: GCC, GNU, MinGW, MSVC, Make, CMake, Ninja

1. Starting with Hello World: How Does a Program Become an Executable File? Let’s start with the simplest C program: On Linux, to run this code, we need to use GCC to turn it into a program that the machine can execute. This process consists of 4 steps: Preprocessing (<span>hello.c</span> → <span>hello.i</span>): Handling preprocessing directives … Read more

Ignition-CMake2: The Swiss Army Knife for C++ Projects

Ignition-CMake2: The Swiss Army Knife for C++ Projects

Ignition-CMake2: The Swiss Army Knife for C++ Projects Ignition-CMake2 is a tool library specifically designed to simplify the build process for C++ projects. It acts like a “Swiss Army Knife,” providing C++ developers with a variety of convenient tools and modules to help them manage their projects more efficiently. While it is primarily used in … Read more