Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Cmake Handson
3 students

Cmake Handson

How to use cmake build system to cross platform manage your source code projects
Created byMike jiang
Last updated 3/2024
English

What you'll learn

  • what is cmake ,how does it work in general
  • how to use cmake to organize your project source code
  • create your own cmake project
  • you are able to do all the examples which I show in class
  • cmake is cross platform to manage your project cross platform

Course content

1 section15 lectures2h 12m total length
  • Introduction to cmake build system + simple source code project11:57

    A quick introduction to cmake , why it is good, it will create a makefile depends on your OS. so your program could run in different OS(operating system) platform, Including first example0 in this video for your practice.

  • How to cmake to manage multiply source code project3:36

    An example1 to show you how to manage many source code files by cmake

  • How to use variables in cmake and create src folder to better organization7:45

    An example2 to show your how to use variables to grab all the source code files , and create a src folder to better organize your project folder structure.

  • How to make a library in your project6:57

    we move the math power function out to a separate file, make it a library to your project.

  • How to use config.in.h to configure your project with conditional compilation6:44

    in order to give your project more flexibility, we write a config.in.h to cmake system according cmake rules.

    cmake will take our config.in.h to generate config.h to our project,  program could include the config.h to do conditional compilation etc.

  • How to make install the project to your system8:29

    We want to make our demo more looks like a real project ,so we added readme, copyright and rundemo.sh etc

    it really looks like a real project online with good shape

  • How to make a new car project10:54

    This s a new example,  in the video also will teach you how top setup c++ stand in cmake, and how to use variables in cmake.

  • How do I organize car project with better folder structure10:05

    Organizing header files to inc folder, and source code files to src folder, add include header searching path to cmake file, use feature of cmake to collect all the source code files to our variable. Making car libcar.a and libcar.so,  link them to a main.c to a program.

  • How to use message() to debug cmake file and how to use list()10:23

    How do we debug cmake with message(), and using list to connect strings , and append , remove strings. etc

  • How to enable MACRO define and use predefined MACROs from cmake6:34

    Enable MACRO define to switch your program printing and not printing will help to debug program. there are many predefined MACRO in cmake that you could directly use it.

  • How to generate 2 program in one cmake project10:36

    How to generate 2 executable files in one cmake project.  of course you could make as many as executables you want to . this class make a our car project more real. great folder structure.

  • How a library depends on another library8:19

    This is great practice to show you how one library depends on another one. but if you want to know more fundamental difference between dynamic and static library, you would need to learn more online. or learn my class later when I make it.

  • Porting an open source project BOA webserver from configure to cmake - 110:53

    Part 1 of This is a great porting project to practice, BOA webserver is an open source project, I have used it in my previous company in production. It was at least 15 years ago, this project is out of date. no maintenance anymore. but it is a great project that i could show you how to port it from ./configure && make && make install to cmake build system. hope you really could practice this buy your own. and get it running on your linux ubuntu. good luck.

  • Porting an open source project BOA webserver from configure to cmake - 211:24

    Part 2 of This is a great porting project to practice, BOA webserver is an open source project, I have used it in my previous company in production. It was at least 15 years ago, this project is out of date. no maintenance anymore. but it is a great project that i could show you how to port it from ./configure && make && make install to cmake build system. hope you really could practice this buy your own. and get it running on your linux ubuntu. good luck.

  • Porting an open source project BOA webserver from configure to cmake - 37:51

    Part 3 of This is a great porting project to practice, BOA webserver is an open source project, I have used it in my previous company in production. It was at least 15 years ago, this project is out of date. no maintenance anymore. but it is a great project that i could show you how to port it from ./configure && make && make install to cmake build system. hope you really could practice this buy your own. and get it running on your linux ubuntu. good luck.

Requirements

  • basic c or c++ helloworld program
  • understand a bit of makefile
  • know how to genarate a program from gcc command
  • has basic concept of how to use libraries in programming

Description

This course will cover cmake build system. We will first introduce the cmake concepts which will then be directly applied to the example projects . You will learn how do we cmake to manage your projects source code etc.


I struggled a lot myself when learning some of these concepts for the first time in college. It was always hard learning about a project reference. Despite being very interested in the topic, I was not successful in internalizing these concepts the first time around as I didn't have a live example to meddle with and actually see running. This is my motivation for this course - to provide learners with what I myself did not have.


I hope you all enjoy the instruction. I would very much appreciate any feedback you may have or suggestions on topics for further content. The best way to help me is to leave a review and share the class link with your friends. I'm currently planning to succeed this course with one on how to fully understand Linux kernel source code (v0.11.0).


Q&A:

Your feedback is always welcome! Once you register my class, you will see each source code file attached. You can also send me messages and make an appointment for the Zoom Q&A meetings on the weekends to let me know your thoughts or raise any questions on the material. Happy to meet you guys.

Who this course is for:

  • college students/new graduates.
  • recent graduates with 1-2 years experience.
  • high-level language developers (python, java, app developers).
  • java script/web developers.
  • professionals and technology enthusiasts who are interested in gaining practical hands-on experience to more deeply understand how cmake works.
  • job seekers interested in embedded software roles at tech companies (i.e. Google, Amazon, Apple, etc…).
  • anyone is interested in how to organize your project in good way