| 1 |
project('foob', 'c', |
| 2 |
default_options : ['defopoverride=s_defopt', # This should be overridden. |
| 3 |
'fromspfunc=s_defopt', # This is specified with a default_options kwarg to subproject() |
| 4 |
'fromcmdline=s_defopt'] # This should get the value set in command line. |
| 5 |
) |
| 6 |
|
| 7 |
assert(get_option('fromcmdline') == 's_cmdline', 'Default option defined in cmd line is incorrect: ' + get_option('fromcmdline')) |
| 8 |
assert(get_option('fromspfunc') == 'spfunc', 'Default option set with subproject() incorrect: ' + get_option('fromspfunc')) |
| 9 |
assert(get_option('fromspfunconly') == 'spfunc', 'Default option set with subproject() incorrect: ' + get_option('fromspfunc')) |
| 10 |
assert(get_option('defopoverride') == 's_defopt', 'Default option without cmd line override is incorrect: ' + get_option('defopoverride')) |
| 11 |
assert(get_option('fromoptfile') == 's_optfile', 'Default value from option file is incorrect: ' + get_option('fromoptfile')) |