Skip to content

Commit

Permalink
feat: Add a global cpp_standard build flag
Browse files Browse the repository at this point in the history
Should make forks for just changing the C++ standard unnecessary.
  • Loading branch information
timniederhausen committed Jan 14, 2025
1 parent 01c96fd commit 0e20085
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/BUILDCONFIG.gn
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ declare_args() {
# can depend on each other (e.g. $external/mysql_connector -> $external/zlib)
external = "//external"

# Project-wide C++ standard to use.
cpp_standard = 20

# DON'T ADD MORE FLAGS HERE. Read the comment above.
}

Expand Down Expand Up @@ -298,7 +301,7 @@ default_compiler_configs = [
"//build/config:default_optimization",
"//build/config:default_stack_frames",
"//build/config:default_symbols",
"//build/config:c++20",
"//build/config:c++${cpp_standard}",
"//build/config:rtti",
"//build/config:exceptions",
"//build/config:runtime_library",
Expand Down

0 comments on commit 0e20085

Please sign in to comment.