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.
31 lines
1.1 KiB
31 lines
1.1 KiB
2 years ago
|
project('cmakeSubTest', ['c', 'cpp'])
|
||
|
|
||
|
# Fallback to a CMake subproject
|
||
|
sub_dep = dependency('cmModLib++')
|
||
|
exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep])
|
||
|
test('test1', exe1)
|
||
|
|
||
|
# Subproject contains both meson.build and CMakeLists.txt. It should default
|
||
|
# to meson but wrap force cmake.
|
||
|
subproject('force_cmake')
|
||
|
|
||
2 years ago
|
testcase expect_error('Wrap method \'notfound\' is not supported, must be one of: meson, cmake, cargo')
|
||
2 years ago
|
subproject('broken_method')
|
||
|
endtestcase
|
||
|
|
||
|
# With method=meson we can't use cmake.subproject()
|
||
|
cmake = import('cmake')
|
||
|
testcase expect_error('Wrap method is \'meson\' but we are trying to configure it with cmake')
|
||
|
cmake.subproject('meson_method')
|
||
|
endtestcase
|
||
|
|
||
|
# cmake.subproject() force cmake method even if meson.build exists.
|
||
|
testcase expect_error('Subproject exists but has no CMakeLists.txt file.')
|
||
|
cmake.subproject('meson_subp')
|
||
|
endtestcase
|
||
|
|
||
|
# Without specifying the method it defaults to meson even if CMakeLists.txt exists.
|
||
|
testcase expect_error('Subproject exists but has no meson.build file.')
|
||
|
subproject('cmake_subp')
|
||
|
endtestcase
|