The Meson Build System http://mesonbuild.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
676 B

# Explicitly require PIE so that mixing compilers with different defaults for
# whether to use PIE works.
project('CMake mix', ['c', 'cpp'],
default_options: ['b_pie=true'])
if not add_languages('objc', required : false)
error('MESON_SKIP_TEST: No ObjC compiler')
endif
objc = meson.get_compiler('objc')
c = meson.get_compiler('c')
if c.get_argument_syntax() != objc.get_argument_syntax()
error('MESON_SKIP_TEST: cmake cannot mix compiler types on Windows')
endif
cm = import('cmake')
sub_pro = cm.subproject('cmTest')
sub_dep = sub_pro.dependency('cmTest', include_type: 'system')
exe1 = executable('exe1', ['main.c'], dependencies: [sub_dep])
test('test1', exe1)