Skip to main content

cppdialect

Specifies the C++ dialect to compile with.

cppdialect ("value")

Parameters

value is one of:

ValueDescription
Defaultthe default C++ dialect for the toolset
C++latestthe latest C++ dialect for the toolset or action where available, otherwise the latest C++ dialect supported by Premake
C++98ISO C++98 Standard
C++0xISO C++11 Draft
C++11ISO C++11 Standard
C++1yISO C++14 Draft
C++14ISO C++14 Standard
C++1zISO C++17 Draft
C++17ISO C++17 Standard
C++2aISO C++20 Draft
C++20ISO C++20 Standard
C++2bISO C++23 Draft
C++23ISO C++23 Standard
gnu++98GNU dialect of ISO C++98 Standard
gnu++0xGNU dialect of ISO C++11 Draft
gnu++11GNU dialect of ISO C++11 Standard
gnu++1yGNU dialect of ISO C++14 Draft
gnu++14GNU dialect of ISO C++14 Standard
gnu++1zGNU dialect of ISO C++17 Draft
gnu++17GNU dialect of ISO C++17 Standard
gnu++2aGNU dialect of ISO C++20 Draft
gnu++20GNU dialect of ISO C++20 Standard
gnu++2bGNU dialect of ISO C++23 Draft
gnu++23GNU dialect of ISO C++23 Standard

Applies To

Project and file configurations.

Availability

Premake 5.0.0-alpha12 or later.

Examples

cppdialect "C++11"