Skip to the task
Layout
Back to classic view

You are looking at lesson 1. Your place is still lesson 10, task 1: struct.

CREATETask 3 of 21 · step 3: Your first programCreate practice/01/CMakeLists.txt
Create practice/01/CMakeLists.txt in practice/01/

Create the folder practice/01 and in it a CMakeLists.txt with one line: build a program called p01_hello from main.c.

Checklist

  • Every task is one commit with a clear message.

Numbered notes in the code explain the important lines.

Details & hint

Create the folder by right-clicking practice → New → Directory.

The root CMakeLists.txt finds every practice/NN folder that has a CMakeLists.txt by itself, so you don't change it.

practice 01 CMakeLists.txt Code Diff +1
A · NEW FILE Create this file. Every line is new: see the green bar.
add_executable(p01_hello main.c)
Note 1: The program p01_hello, built from main.c.