| 1 |
project('test project') |
| 2 |
|
| 3 |
case = get_option('case') |
| 4 |
|
| 5 |
if case == 'find_program' |
| 6 |
prog = find_program('bash') |
| 7 |
result = run_command(prog, ['--version'], check: true) |
| 8 |
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load bash from config file') |
| 9 |
elif case == 'config_dep' |
| 10 |
add_languages('cpp') |
| 11 |
dep = dependency('llvm', method : 'config-tool') |
| 12 |
assert(dep.get_configtool_variable('version').endswith('12345'), 'Didn\'t load llvm from config file') |
| 13 |
elif case == 'python3' |
| 14 |
prog = import('python3').find_python() |
| 15 |
result = run_command(prog, ['--version'], check: true) |
| 16 |
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python3 from config file') |
| 17 |
elif case == 'python' |
| 18 |
prog = import('python').find_installation() |
| 19 |
result = run_command(prog, ['--version'], check: true) |
| 20 |
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python from config file') |
| 21 |
endif |