From 5891e6fb17de98fae6764bdff929bcaa21a1b36c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 23 Oct 2022 13:41:40 -0400 Subject: Add C++ header build test --- meson.build | 12 ++++++++++++ test/cpp/test_headers_cpp.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 test/cpp/test_headers_cpp.cpp diff --git a/meson.build b/meson.build index 5f8d078..5d5eaa7 100644 --- a/meson.build +++ b/meson.build @@ -453,6 +453,18 @@ if not get_option('tests').disabled() if add_languages(['cpp'], native: false, required: get_option('tests_cpp')) cpp = meson.get_compiler('cpp') + test( + 'test_headers_cpp', + executable( + 'test_headers_cpp', + files('test/cpp/test_headers_cpp.cpp'), + cpp_args: program_c_args, + dependencies: [zix_dep], + include_directories: include_dirs, + link_args: program_link_args, + ), + ) + test( 'test_path_std', executable( diff --git a/test/cpp/test_headers_cpp.cpp b/test/cpp/test_headers_cpp.cpp new file mode 100644 index 0000000..0d55be9 --- /dev/null +++ b/test/cpp/test_headers_cpp.cpp @@ -0,0 +1,29 @@ +// Copyright 2022 David Robillard +// SPDX-License-Identifier: ISC + +#include "zix/allocator.h" // IWYU pragma: keep +#include "zix/attributes.h" // IWYU pragma: keep +#include "zix/bitset.h" // IWYU pragma: keep +#include "zix/btree.h" // IWYU pragma: keep +#include "zix/bump_allocator.h" // IWYU pragma: keep +#include "zix/digest.h" // IWYU pragma: keep +#include "zix/filesystem.h" // IWYU pragma: keep +#include "zix/function_types.h" // IWYU pragma: keep +#include "zix/hash.h" // IWYU pragma: keep +#include "zix/path.h" // IWYU pragma: keep +#include "zix/ring.h" // IWYU pragma: keep +#include "zix/sem.h" // IWYU pragma: keep +#include "zix/status.h" // IWYU pragma: keep +#include "zix/string_view.h" // IWYU pragma: keep +#include "zix/thread.h" // IWYU pragma: keep +#include "zix/tree.h" // IWYU pragma: keep +#include "zix/zix.h" // IWYU pragma: keep + +#if defined(__GNUC__) +__attribute__((const)) +#endif +int +main() +{ + return 0; +} -- cgit v1.2.1