Skip to content

Commit

Permalink
build: Set specific C++ standard to use (C++11)
Browse files Browse the repository at this point in the history
There appears to be a difference in interpretation between clang and
gcc. Whereas gcc will by default pick the newest standard, clang picks
the oldest (or something like that). Enforce a specific standard.

It's good to be explicit but this is not really needed yet. It will be
when upgrading imgui, whose newer version uses constexpr and such.
  • Loading branch information
laanwj committed Jan 30, 2023
1 parent 140fb7a commit cb5683e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('sundog', 'c', 'cpp',
default_options: ['default_library=static', 'c_std=c99', 'warning_level=2'])
default_options: ['default_library=static', 'c_std=c99', 'cpp_std=c++11', 'warning_level=2'])

sdl2_dep = dependency('SDL2')
m_lib = meson.get_compiler('c').find_library('m', required: false)
Expand Down

0 comments on commit cb5683e

Please sign in to comment.