Improve the header includes, cont'd

Also check in the modulemap file, and add a option to build with clang's
-fmodules.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-01-20 16:53:39 +00:00
parent 1e0deea57f
commit 916e23861a
24 changed files with 277 additions and 171 deletions

View File

@@ -33,6 +33,17 @@ if get_option('sanitize')
add_global_link_arguments('-fsanitize='+','.join(sanitizers), language: 'c')
endif
if get_option('modularize')
if not cc.has_argument('-fmodules')
error('option \'modularize\' requires clang')
endif
add_global_arguments(['-fmodules',
'-fmodule-map-file='+
meson.current_source_dir()+
'/src/compton.modulemap'],
language: 'c')
endif
add_global_arguments('-D_GNU_SOURCE', language: 'c')
warns = [ 'all', 'extra', 'no-unused-parameter', 'nonnull', 'shadow', 'implicit-fallthrough' ]