test cases/common/43 subproject options/subprojects/subproject/meson.build
raw| 1 | project('subproject', 'c', |
| 2 | default_options: {'c_std': 'c11', 'c_args': ['-O2']}) |
| 3 | |
| 4 | assert(get_option('c_std') == 'c11') |
| 5 | # could be -O2 as above, or for some cross compilation tests in |
| 6 | # CI it could come from the machine file. but it's certainly |
| 7 | # not the value in the top-level project. |
| 8 | assert(get_option('c_args') != ['-O']) |
| 9 | |
| 10 | if get_option('opt') |
| 11 | error('option set when it should be unset.') |
| 12 | endif |