From 8636e7d337876ccab30915ddd033ffa7f41a045f Mon Sep 17 00:00:00 2001 From: njlr Date: Fri, 19 Oct 2018 14:08:52 +0100 Subject: * Adds Buck build support --- .buckconfig | 7 +++++++ .gitignore | 5 +++++ BUCK | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 .buckconfig create mode 100644 BUCK diff --git a/.buckconfig b/.buckconfig new file mode 100644 index 0000000..71543fc --- /dev/null +++ b/.buckconfig @@ -0,0 +1,7 @@ +[project] + ignore = .git + +[cxx] + should_remap_host_platform = true + untracked_headers = error + untracked_headers_whitelist = /usr/include/.*, /usr/lib/gcc/.* diff --git a/.gitignore b/.gitignore index 3b651bd..bfde3ef 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,8 @@ Makefile *-prefix gitlike /pages/ + +# Buck +/buck-out/ +/.buckd/ +.buckconfig.local diff --git a/BUCK b/BUCK new file mode 100644 index 0000000..7c6e98a --- /dev/null +++ b/BUCK @@ -0,0 +1,35 @@ +prebuilt_cxx_library( + name = 'args', + header_namespace = '', + header_only = True, + exported_headers = [ + 'args.hxx', + ], + visibility = [ + 'PUBLIC', + ], +) + +cxx_binary( + name = 'test', + header_namespace = '', + headers = [ + 'catch.hpp', + ], + srcs = [ + 'test.cxx', + ], + deps = [ + ':args', + ], +) + +cxx_binary( + name = 'gitlike', + srcs = [ + 'gitlike.cxx', + ], + deps = [ + ':args', + ], +) -- cgit v1.2.1 From 106293b0d782082df5f32caa163e9581ed066a0b Mon Sep 17 00:00:00 2001 From: njlr Date: Fri, 19 Oct 2018 14:15:11 +0100 Subject: * Updates BUCK files --- BUCK | 12 +----------- examples/BUCK | 19 +++++++++++++++++++ test/BUCK | 29 +++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 11 deletions(-) create mode 100644 examples/BUCK create mode 100644 test/BUCK diff --git a/BUCK b/BUCK index 7c6e98a..7a1ec05 100644 --- a/BUCK +++ b/BUCK @@ -20,16 +20,6 @@ cxx_binary( 'test.cxx', ], deps = [ - ':args', - ], -) - -cxx_binary( - name = 'gitlike', - srcs = [ - 'gitlike.cxx', - ], - deps = [ - ':args', + '//:args', ], ) diff --git a/examples/BUCK b/examples/BUCK new file mode 100644 index 0000000..2f5b01b --- /dev/null +++ b/examples/BUCK @@ -0,0 +1,19 @@ +cxx_binary( + name = 'gitlike', + srcs = [ + 'gitlike.cxx', + ], + deps = [ + '//:args', + ], +) + +cxx_binary( + name = 'completion', + srcs = [ + 'completion.cxx', + ], + deps = [ + '//:args', + ], +) diff --git a/test/BUCK b/test/BUCK new file mode 100644 index 0000000..de76295 --- /dev/null +++ b/test/BUCK @@ -0,0 +1,29 @@ +cxx_binary( + name = 'multiple-inclusion-1', + srcs = [ + 'multiple_inclusion_1.cxx', + ], + deps = [ + '//:args', + ], +) + +cxx_binary( + name = 'multiple-inclusion-2', + srcs = [ + 'multiple_inclusion_2.cxx', + ], + deps = [ + '//:args', + ], +) + +cxx_binary( + name = 'windows-h', + srcs = [ + 'windows_h.cxx', + ], + deps = [ + '//:args', + ], +) \ No newline at end of file -- cgit v1.2.1