Project

General

Profile

Feature #691 » 0028-Meson-Add-configure-checks-for-static-asserts.patch

S3_1 - Marko Lindqvist, 05/31/2024 01:06 AM

View differences:

gen_headers/meson_freeciv_config.h.in
/* Delta protocol enabled */
#mesondefine FREECIV_DELTA_PROTOCOL
/* C11 static assert supported */
#mesondefine FREECIV_C11_STATIC_ASSERT
/* C++11 static assert supported */
#mesondefine FREECIV_CXX11_STATIC_ASSERT
#endif /* FC__FREECIV_CONFIG_H */
meson.build
pub_conf_data.set('FREECIV_HAVE_LIBZSTD', 1)
endif
if c_compiler.compiles('''
#include <assert.h>
int main(void) { _Static_assert(1, "1 is not true"); }''',
name: 'c11 Static Assert')
pub_conf_data.set('FREECIV_C11_STATIC_ASSERT', 1)
endif
if cxx_build and cxx_compiler.compiles('''
#include <assert.h>
int main(void) { static_assert(1, "1 is not true"); }''',
name: 'c++11 Static Assert')
pub_conf_data.set('FREECIV_CXX11_STATIC_ASSERT', 1)
endif
mw_req = get_option('mwand')
if mw_req != 'false'
mw_dep = dependency('MagickWand', version : '>= 7.0', required : false)
(2-2/2)