Skip to content

Paso — 1-carpeta-cmake

Step 2 of 5

Folder and CMakeLists.txt

Goal

Create the project structure.

Create a hola-cpp/ folder with a minimal CMakeLists.txt. CMake generates the Makefile or IDE project from this file.

  1. Create the project folder.
  2. Paste CMakeLists.txt and save.
  3. Open a terminal in that folder.

					cmake_minimum_required(VERSION 3.16)
project(hola_cpp CXX)

add_executable(hola main.cpp)