diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-05-19 14:43:06 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-05-27 20:23:58 +0300 |
commit | a340b413ef7f25d458806f92d342e52a7356dc01 (patch) | |
tree | 570ccdab57b2e72c5c9766970242bdc3ad05ae38 /test cases | |
parent | 4852ee8cebb2e0a6c00d3ddf41fe85f54a43240e (diff) | |
download | meson-a340b413ef7f25d458806f92d342e52a7356dc01.zip meson-a340b413ef7f25d458806f92d342e52a7356dc01.tar.gz meson-a340b413ef7f25d458806f92d342e52a7356dc01.tar.bz2 |
ninja: Always use to_native on CompilerArgs (fixes #7167)
Diffstat (limited to 'test cases')
3 files changed, 19 insertions, 0 deletions
diff --git a/test cases/common/226 include_type dependency/main.cpp b/test cases/common/226 include_type dependency/main.cpp new file mode 100644 index 0000000..bf8c4a4 --- /dev/null +++ b/test cases/common/226 include_type dependency/main.cpp @@ -0,0 +1,8 @@ +#include <iostream> +#include <boost/graph/filtered_graph.hpp> + +using namespace std; + +int main(void) { + return 0; +} diff --git a/test cases/common/226 include_type dependency/meson.build b/test cases/common/226 include_type dependency/meson.build index fafceaf..d17e920 100644 --- a/test cases/common/226 include_type dependency/meson.build +++ b/test cases/common/226 include_type dependency/meson.build @@ -4,10 +4,16 @@ project( ) dep = dependency('zlib', method: 'pkg-config', required : false) +boost_dep = dependency('boost', modules: ['graph'], include_type : 'system', required: false) + if not dep.found() error('MESON_SKIP_TEST zlib was not found') endif +if not boost_dep.found() + error('MESON_SKIP_TEST boost was not found') +endif + assert(dep.include_type() == 'preserve', 'include_type must default to "preserve"') dep_sys = dep.as_system() @@ -26,3 +32,7 @@ assert(sp_dep.include_type() == 'preserve', 'default is preserve') sp_dep_sys = sp_dep.as_system('system') assert(sp_dep_sys.include_type() == 'system', 'changing include_type works') assert(sp_dep.include_type() == 'preserve', 'as_system must not mutate the original object') + +# Check that PCH works with `include_type : 'system'` See https://github.com/mesonbuild/meson/issues/7167 +main_exe = executable('main_exe', 'main.cpp', cpp_pch: 'pch/test.hpp', dependencies: boost_dep) +test('main_test', main_exe) diff --git a/test cases/common/226 include_type dependency/pch/test.hpp b/test cases/common/226 include_type dependency/pch/test.hpp new file mode 100644 index 0000000..0d40fe1 --- /dev/null +++ b/test cases/common/226 include_type dependency/pch/test.hpp @@ -0,0 +1 @@ +#include <boost/graph/filtered_graph.hpp> |