From 58fc34170a42097c090547293425d74e98639870 Mon Sep 17 00:00:00 2001 From: Michael Brockus <55331536+michaelbrockus@users.noreply.github.com> Date: Thu, 6 Aug 2020 13:30:36 -0700 Subject: [PATCH 1/2] Update meson.build --- meson.build | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/meson.build b/meson.build index e44cb90..a0ae780 100644 --- a/meson.build +++ b/meson.build @@ -4,45 +4,11 @@ # # license: MIT # -project('CException', 'c', +project('cexception', 'c', license: 'MIT', meson_version: '>=0.53.0', - default_options: ['layout=flat', 'warning_level=3', 'werror=true', 'c_std=c11'] + default_options: ['werror=true', 'c_std=c11'] ) -lang = 'c' -cc = meson.get_compiler(lang) -# -# Meson: Add compiler flags -if cc.get_id() == 'clang' - add_project_arguments(cc.get_supported_arguments( - [ - '-Wexit-time-destructors', - '-Wglobal-constructors', - '-Wmissing-prototypes', - '-Wmissing-noreturn', - '-Wno-missing-braces', - '-Wold-style-cast', '-Wpointer-arith', '-Wweak-vtables', - '-Wcast-align', '-Wconversion', '-Wcast-qual', '-Wshadow' - ] - ), language: lang) -endif - -if cc.get_argument_syntax() == 'gcc' - add_project_arguments(cc.get_supported_arguments( - [ - '-Wformat', '-Waddress', '-Winit-self', '-Wno-multichar', - '-Wpointer-arith' , '-Wwrite-strings' , - '-Wno-parentheses' , '-Wno-type-limits' , - '-Wformat-security' , '-Wunreachable-code' , - '-Waggregate-return' , '-Wformat-nonliteral' , - '-Wmissing-declarations', '-Wmissing-include-dirs' , - '-Wno-unused-parameter' - ] - ), language: lang) -endif - -# -# Sub directory to project source code subdir('lib') cexception_dep = declare_dependency(link_with: cexception_lib, include_directories: cexception_dir) From de9be4ca92b169353fbbdebdcb6bc2cfd4fcb123 Mon Sep 17 00:00:00 2001 From: Michael Brockus <55331536+michaelbrockus@users.noreply.github.com> Date: Thu, 6 Aug 2020 13:32:25 -0700 Subject: [PATCH 2/2] Use files method --- lib/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/meson.build b/lib/meson.build index c9afe20..2770122 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -7,5 +7,5 @@ cexception_dir = include_directories('.') cexception_lib = static_library(meson.project_name(), - sources: ['CException.c'], - include_directories: cexception_dir) + files('CException.c'), + include_directories : cexception_dir)