Project

General

Profile

Feature #708 » 0024-Meson-Add-check-for-FREECIV_STATIC_STRLEN.patch

S3_1 - Marko Lindqvist, 06/08/2024 10:58 PM

View differences:

gen_headers/meson_freeciv_config.h.in
/* C++11 static assert supported */
#mesondefine FREECIV_CXX11_STATIC_ASSERT
/* strlen() in static assert supported */
#mesondefine FREECIV_STATIC_STRLEN
#endif /* FC__FREECIV_CONFIG_H */
meson.build
pub_conf_data.set('FREECIV_CXX11_STATIC_ASSERT', 1)
endif
if c_compiler.compiles('''
#include <assert.h>
#include <string.h>
static const char str[] = "12345";
int main(void) { _Static_assert(5 == strlen(str), "Wrong length"); }''',
name: 'strlen() in static assert')
pub_conf_data.set('FREECIV_STATIC_STRLEN', 1)
endif
mw_req = get_option('mwand')
if mw_req != 'false'
mw_dep = dependency('MagickWand', version : '>= 7.0', required : false)
(2-2/2)