Skip to content

Commit a8de642

Browse files
committed
* Implemented Buck builds
1 parent 0034c8e commit a8de642

File tree

8 files changed

+93
-0
lines changed

8 files changed

+93
-0
lines changed

.buckconfig

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[cxx]
2+
gtest_dep = //contrib/gtest:gtest

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,10 @@ paket-files/
262262
# Python Tools for Visual Studio (PTVS)
263263
__pycache__/
264264
*.pyc
265+
266+
# Buck
267+
/buck-out/
268+
/.buckd/
269+
/buckaroo/
270+
.buckconfig.local
271+
BUCKAROO_DEPS

BUCK

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cxx_library(
2+
name = 'clickhouse-cpp',
3+
header_namespace = 'clickhouse',
4+
exported_headers = subdir_glob([
5+
('clickhouse', '**/*.h'),
6+
]),
7+
srcs = glob([
8+
'clickhouse/**/*.cpp',
9+
]),
10+
compiler_flags = [
11+
'-std=c++11',
12+
],
13+
visibility = [
14+
'PUBLIC',
15+
],
16+
deps = [
17+
'//contrib/cityhash:cityhash',
18+
'//contrib/lz4:lz4',
19+
]
20+
)

contrib/cityhash/BUCK

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cxx_library(
2+
name = 'cityhash',
3+
header_namespace = 'cityhash',
4+
exported_headers = subdir_glob([
5+
('', '*.h'),
6+
]),
7+
srcs = glob([
8+
'*.cc',
9+
]),
10+
visibility = [
11+
'//...',
12+
],
13+
)

contrib/gtest/BUCK

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cxx_library(
2+
name = 'gtest',
3+
# This is a bit weird, but this is how the tests use the headers...
4+
header_namespace = 'contrib/gtest',
5+
exported_headers = subdir_glob([
6+
('', '*.h'),
7+
]),
8+
srcs = glob([
9+
'*.cc',
10+
]),
11+
visibility = [
12+
'//...',
13+
],
14+
)

contrib/lz4/BUCK

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cxx_library(
2+
name = 'lz4',
3+
header_namespace = 'lz4',
4+
exported_headers = subdir_glob([
5+
('', '*.h'),
6+
]),
7+
srcs = glob([
8+
'*.c',
9+
]),
10+
visibility = [
11+
'//...',
12+
],
13+
)

tests/simple/BUCK

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cxx_binary(
2+
name = 'simple',
3+
srcs = [
4+
'main.cpp',
5+
],
6+
compiler_flags = [
7+
'-std=c++11',
8+
],
9+
deps = [
10+
'//:clickhouse-cpp',
11+
],
12+
)

ut/BUCK

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
cxx_test(
2+
name = 'ut',
3+
srcs = glob([
4+
'*.cpp',
5+
]),
6+
compiler_flags = [
7+
'-std=c++11',
8+
],
9+
deps = [
10+
'//:clickhouse-cpp',
11+
],
12+
)

0 commit comments

Comments
 (0)