Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add meson support #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ The current supported compilers are gcc, clang, MSVC's cl.exe, and clang-cl.exe.

It also works with tcc but with a caveat: the latest release of the tcc compiler (version 0.9.27) lacks a feature for UTEST to work. Make sure to use a tcc that is patched with the constructor attribute extension. Recent Ubuntu and Debian Linux distros ship tcc with that patch already included. If you compile tcc yourself, use the trunk version and it will work as expected.

### Meson

If you are using Meson, you can use the following snippet to include utest.h in your project:

Put the following file into subprojects/utest.h.wrap:

```ini
[wrap-git]
url = https://github.com/sheredom/utest.h.git
revision = head
depth = 1

[provide]
utest=utest_dep
```

Then in your meson.build file, you can use the following snippet to include utest.h in your project:
```meson
utest_dep = dependency('utest')

executable('mytest', 'mytest.c', dependencies: [utest_dep])
```

## Command Line Options

utest.h supports some command line options:
Expand Down
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
project('utest')

utest_include = include_directories('.')

utest_dep = declare_dependency(
include_directories: utest_include,
)