Git Product home page Git Product logo

cmake-explained's Introduction

CMake Explained: A Bird's-eye View of Modern CMake

Status

This tutorial is a work in progress. See CHANGELOG.md for the current version as well as more details in each version.

What is this and for whom?

This tutorial is NOT intended to show you how to use specific features to write a CMake file, although showing the features is sometimes inevitable in order to explain the topics. If you want to write a CMake file to build the project at hand, refer to the official CMake Tutorial.

Instead, this tutorial means to provide a bird's-eye view of CMake so you will see all the important parts of this tool and how these parts are related to each other. Therefore, the best readers of this tutorial are those who have used CMake for a while and want to get a full grasp of this tool in order to harness its full power. When you need the details, the official documentation is always there and informative.

To Continue Reading...

cmake-explained's People

Contributors

yaobinwen avatar

Stargazers

 avatar

Watchers

 avatar

cmake-explained's Issues

Learn CMake

Description

I also need to learn further about CMake in order to write the tutorial.

Write the tutorial

Description

This issue tracks my ideas of how to deliver the content in a more concise and clear way.

As of today (2023-05-21), I think a better way of organizing the topics is:

  • Use a few sections to help the readers see the big picture, so when they have a question, they know where they are and can find the related topics.

  • Help the readers know how to understand CMake. See T1 below.

  • CMake is big, so I should not try to cover everything in one sitting. Instead, I need to go iterations:

    • In the first iteration, I should just build a simple executable program without static or dynamic libraries. But this example includes not only the core building part, but also the related parts of the whole lifecycle, including:
      • Building Debug and Release.
      • Testing
      • Installing
      • Packaging and distributing
    • In the future iterations, I should gradually cover the more detailed topics, such as:
      • Build static/dynamic libraries.
      • Generator expressions
      • Export configuration.
  • T1. Add chapter "Introduction: How to Understand CMake"

    • Software engineering is always a mixed effort.
    • Need to understand the build process.
    • Need to know what problems a build process may encounter.
    • Understand target and properties.
    • Understand various parts of CMake: it's a build tool, but also a programming language.
    • Know "modern CMake".
  • T2. Move the current chapters about target and properties into the section "Targets and Properties: Center of the Stage".

  • T3. Mention "Imported target" and "Alias target".

  • T4: Iteration one: Build the core part:

    • T4.1: Write about the goal:
      • 1). Build a debug version of the code for testing.
      • 2). Build a release version of the code for distributing.
    • T4.2: Explain "targets" and "properties".
    • T4.3: Explain Debug and Release.
    • T4.4: Explain how to run tests and use the test dashboard.
    • T4.5: Explain how to packaging and distributing.
    • T4.6: Explain how to installing.

(To be continued.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.