diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-25 15:49:58 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-25 19:42:15 +0200 |
commit | ea3b54d40252fcb87eb1852223f125398b1edbdf (patch) | |
tree | 7611d792ab044f5acc0d03c7df164827b0b3469c /test cases | |
parent | 8a68dc0179bc63303a8ef8c4a339cc01ca406084 (diff) | |
download | meson-ea3b54d40252fcb87eb1852223f125398b1edbdf.zip meson-ea3b54d40252fcb87eb1852223f125398b1edbdf.tar.gz meson-ea3b54d40252fcb87eb1852223f125398b1edbdf.tar.bz2 |
Use include_directories for D impdirs.
Change the code to store D properties as plain data. Only convert them
to compiler flags in the backend. This also means we can fully parse D
arguments without needing to know the compiler being used.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/d/9 features/meson.build | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test cases/d/9 features/meson.build b/test cases/d/9 features/meson.build index 9e63710..356e9f3 100644 --- a/test cases/d/9 features/meson.build +++ b/test cases/d/9 features/meson.build @@ -1,8 +1,22 @@ project('D Features', 'd') -# directory for data +# ONLY FOR BACKWARDS COMPATIBILITY. +# DO NOT DO THIS IN NEW CODE! +# USE include_directories() INSTEAD OF BUILDING +# STRINGS TO PATHS MANUALLY! data_dir = join_paths(meson.current_source_dir(), 'data') +e_plain_bcompat = executable('dapp_menu_bcompat', + 'app.d', + d_import_dirs: [data_dir] +) +test('dapp_menu_t_fail_bcompat', e_plain_bcompat, should_fail: true) +test('dapp_menu_t_bcompat', e_plain_bcompat, args: ['menu']) + +# directory for data +# This is the correct way to do this. +data_dir = include_directories('data') + e_plain = executable('dapp_menu', 'app.d', d_import_dirs: [data_dir] @@ -10,6 +24,7 @@ e_plain = executable('dapp_menu', test('dapp_menu_t_fail', e_plain, should_fail: true) test('dapp_menu_t', e_plain, args: ['menu']) + # test feature versions and string imports e_versions = executable('dapp_versions', 'app.d', |