| 1 |
project('foo') |
| 2 |
|
| 3 |
a = configuration_data() |
| 4 |
a.set('HELLO', 1) |
| 5 |
|
| 6 |
b = a |
| 7 |
|
| 8 |
assert(a.has('HELLO'), 'Original config data should be set on a') |
| 9 |
assert(b.has('HELLO'), 'Original config data should be set on copy') |
| 10 |
|
| 11 |
configure_file(output : 'b.h', configuration : b) |
| 12 |
|
| 13 |
# This should still work, as we didn't use the original above but a copy! |
| 14 |
a.set('WORLD', 1) |
| 15 |
|
| 16 |
assert(a.has('WORLD'), 'New config data should have been set') |
| 17 |
assert(not b.has('WORLD'), 'New config data set should not affect var copied earlier') |
| 18 |
|
| 19 |
configure_file(output : 'a.h', configuration : a) |