Skip to content

Commit

Permalink
Buck build support (#31)
Browse files Browse the repository at this point in the history
*  * Adds Buck build support

*  * Adds more qualifiers to visible target in README
  • Loading branch information
njlr authored and adishavit committed Nov 8, 2018
1 parent 6b95a49 commit 0775441
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[project]
ignore = .git

[cxx]
should_remap_host_platform = true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build/
.vs/
buck-out/
.buckd/
.buckconfig.local
35 changes: 35 additions & 0 deletions BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
prebuilt_cxx_library(
name = 'argh',
header_namespace = '',
header_only = True,
exported_headers = [
'argh.h',
],
visibility = [
'PUBLIC',
],
)

cxx_binary(
name = 'tests',
header_namespace = '',
headers = [
'doctest.h',
],
srcs = [
'argh_tests.cpp',
],
deps = [
':argh',
],
)

cxx_binary(
name = 'example',
srcs = [
'example.cpp',
],
deps = [
':argh',
],
)
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,25 @@ target_link_libraries(${MY_TARGET_NAME} argh)
```

## Buck

The [Buck](https://buckbuild.com/) build system is also supported.

Run the example:

```bash=
buck run :example
```

Run the tests:

```bash=
buck run :tests
buck run test_package
```

If you take `argh` as a submodule, then the visible target is `//:argh`.

## Colophon

I ❤ your feedback. If you found Argh! useful - do Tweet about it to let [me](https://twitter.com/AdiShavit) know. If you found it lacking, please post an [issue](https://github.com/adishavit/argh/issues).
9 changes: 9 additions & 0 deletions test_package/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cxx_binary(
name = 'test_package',
srcs = [
'test_package.cpp',
],
deps = [
'//:argh',
],
)

0 comments on commit 0775441

Please sign in to comment.