C++ 23 · CMake

A minimal CMakeLists.txt

A project with C++23 and one executable target.

cmake_minimum_required(VERSION 3.20)
project(app LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(app main.cpp util.cpp)

Official C++ 23 documentation

More cmake commands

All cmake commands · C++ 23 cheatsheet

Was this page helpful?