Skip to content

Commit a15a0b9

Browse files
authored
[Chore](build) use file(GLOB_RECURSE xxx CONFIGURE_DEPENDS) to replace set cpp (apache#20461)
use file(GLOB_RECURSE xxx CONFIGURE_DEPENDS) to replace set cpp
1 parent 4faee4d commit a15a0b9

35 files changed

Lines changed: 88 additions & 2867 deletions

‎.clang-format-ignore‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,3 @@ be/src/util/sse2neon.h
99
be/src/util/mustache/mustache.h
1010
be/src/util/mustache/mustache.cc
1111
be/src/util/utf8_check.cpp
12-
be/src/util/cityhash102/city.h
13-
be/src/util/cityhash102/city.cc
14-
be/src/util/cityhash102/citycrc.h
15-
be/src/util/cityhash102/config.h

‎.licenserc.yaml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ header:
6666
- "be/src/util/sse2neo.h"
6767
- "be/src/util/sse2neon.h"
6868
- "be/src/util/utf8_check.cpp"
69-
- "be/src/util/cityhash102"
7069
- "be/src/pch/*"
7170
- "build-support/run_clang_format.py"
7271
- "regression-test/data"

‎be/src/agent/CMakeLists.txt‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,7 @@ set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/agent")
2121
# where to put generated binaries
2222
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/agent")
2323

24-
set(AGENT_SOURCES
25-
agent_server.cpp
26-
heartbeat_server.cpp
27-
task_worker_pool.cpp
28-
utils.cpp
29-
topic_subscriber.cpp
30-
user_resource_listener.cpp
31-
)
24+
file(GLOB_RECURSE AGENT_SOURCES CONFIGURE_DEPENDS *.cpp)
3225

3326
if (OS_MACOSX)
3427
list(REMOVE_ITEM AGENT_SOURCES user_resource_listener.cpp)

‎be/src/common/CMakeLists.txt‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@
1818
# where to put generated libraries
1919
set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/common")
2020

21-
add_library(Common STATIC
22-
daemon.cpp
23-
status.cpp
24-
resource_tls.cpp
25-
logconfig.cpp
26-
config.cpp
27-
exception.cpp
28-
version_internal.cpp
29-
)
21+
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS *.cpp)
22+
add_library(Common STATIC ${SRC_FILES})
3023

3124
pch_reuse(Common)
3225

‎be/src/exec/CMakeLists.txt‎

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,7 @@ set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/exec")
2121
# where to put generated binaries
2222
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/exec")
2323

24-
set(EXEC_FILES
25-
data_sink.cpp
26-
decompressor.cpp
27-
exec_node.cpp
28-
text_converter.cpp
29-
olap_common.cpp
30-
tablet_info.cpp
31-
es/es_scan_reader.cpp
32-
es/es_scroll_query.cpp
33-
es/es_scroll_parser.cpp
34-
schema_scanner.cpp
35-
schema_scanner/schema_tables_scanner.cpp
36-
schema_scanner/schema_dummy_scanner.cpp
37-
schema_scanner/schema_schemata_scanner.cpp
38-
schema_scanner/schema_variables_scanner.cpp
39-
schema_scanner/schema_columns_scanner.cpp
40-
schema_scanner/schema_charsets_scanner.cpp
41-
schema_scanner/schema_collations_scanner.cpp
42-
schema_scanner/schema_helper.cpp
43-
schema_scanner/schema_views_scanner.cpp
44-
schema_scanner/schema_statistics_scanner.cpp
45-
schema_scanner/schema_table_privileges_scanner.cpp
46-
schema_scanner/schema_schema_privileges_scanner.cpp
47-
schema_scanner/schema_user_privileges_scanner.cpp
48-
schema_scanner/schema_files_scanner.cpp
49-
schema_scanner/schema_partitions_scanner.cpp
50-
schema_scanner/schema_rowsets_scanner.cpp
51-
scan_node.cpp
52-
odbc_connector.cpp
53-
table_connector.cpp
54-
schema_scanner.cpp
55-
rowid_fetcher.cpp
56-
)
24+
file(GLOB_RECURSE EXEC_FILES CONFIGURE_DEPENDS *.cpp)
5725

5826
if (WITH_LZO)
5927
set(EXEC_FILES ${EXEC_FILES}

‎be/src/exprs/CMakeLists.txt‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,7 @@ set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/exprs")
2121
# where to put generated binaries
2222
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/exprs")
2323

24-
add_library(Exprs
25-
block_bloom_filter_avx_impl.cc
26-
block_bloom_filter_impl.cc
27-
runtime_filter.cpp
28-
runtime_filter_rpc.cpp
29-
math_functions.cpp
30-
string_functions.cpp
31-
json_functions.cpp
32-
)
24+
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS *.cpp *.cc)
25+
add_library(Exprs STATIC ${SRC_FILES})
3326

3427
pch_reuse(Exprs)

‎be/src/http/CMakeLists.txt‎

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,9 @@ set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/http")
2121
# where to put generated binaries
2222
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/http")
2323

24-
add_library(Webserver STATIC
25-
http_headers.cpp
26-
http_method.cpp
27-
http_request.cpp
28-
http_channel.cpp
29-
http_status.cpp
30-
http_parser.cpp
31-
http_handler_with_auth.cpp
32-
web_page_handler.cpp
33-
default_path_handlers.cpp
34-
utils.cpp
35-
ev_http_server.cpp
36-
http_client.cpp
37-
action/download_action.cpp
38-
action/download_binlog_action.cpp
39-
action/pad_rowset_action.cpp
40-
action/health_action.cpp
41-
action/tablet_migration_action.cpp
42-
action/tablets_info_action.cpp
43-
action/tablets_distribution_action.cpp
44-
action/checksum_action.cpp
45-
action/snapshot_action.cpp
46-
action/reload_tablet_action.cpp
47-
action/restore_tablet_action.cpp
48-
action/pprof_actions.cpp
49-
action/metrics_action.cpp
50-
action/stream_load.cpp
51-
action/stream_load_2pc.cpp
52-
action/meta_action.cpp
53-
action/compaction_action.cpp
54-
action/config_action.cpp
55-
action/check_rpc_channel_action.cpp
56-
action/reset_rpc_channel_action.cpp
57-
action/check_tablet_segment_action.cpp
58-
action/version_action.cpp
59-
action/jeprofile_actions.cpp
60-
action/file_cache_action.cpp)
24+
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS
25+
*.cpp
26+
)
27+
add_library(Webserver STATIC ${SRC_FILES})
6128

6229
pch_reuse(Webserver)

‎be/src/io/CMakeLists.txt‎

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,8 @@ set(LIBRARY_OUTPUT_PATH "${BUILD_DIR}/src/io")
2121
# where to put generated binaries
2222
set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/io")
2323

24-
set(IO_FILES
25-
file_factory.cpp
26-
hdfs_builder.cpp
27-
fs/file_reader_options.cpp
28-
fs/file_reader.cpp
29-
fs/file_system.cpp
30-
fs/remote_file_system.cpp
31-
fs/local_file_system.cpp
32-
fs/local_file_reader.cpp
33-
fs/local_file_writer.cpp
34-
fs/s3_file_system.cpp
35-
fs/s3_file_reader.cpp
36-
fs/s3_file_writer.cpp
37-
fs/s3_file_write_bufferpool.cpp
38-
fs/hdfs_file_system.cpp
39-
fs/hdfs_file_reader.cpp
40-
fs/hdfs_file_writer.cpp
41-
fs/broker_file_system.cpp
42-
fs/broker_file_reader.cpp
43-
fs/broker_file_writer.cpp
44-
fs/buffered_reader.cpp
45-
fs/stream_load_pipe.cpp
46-
fs/multi_table_pipe.cpp
47-
fs/err_utils.cpp
48-
fs/fs_utils.cpp
49-
cache/dummy_file_cache.cpp
50-
cache/file_cache.cpp
51-
cache/file_cache_manager.cpp
52-
cache/sub_file_cache.cpp
53-
cache/whole_file_cache.cpp
54-
cache/block/block_file_segment.cpp
55-
cache/block/block_file_cache.cpp
56-
cache/block/block_file_cache_profile.cpp
57-
cache/block/block_file_cache_factory.cpp
58-
cache/block/block_lru_file_cache.cpp
59-
cache/block/cached_remote_file_reader.cpp
60-
)
24+
file(GLOB_RECURSE IO_FILES CONFIGURE_DEPENDS *.cpp)
6125

62-
add_library(IO STATIC
63-
${IO_FILES}
64-
)
26+
add_library(IO STATIC ${IO_FILES})
6527

6628
pch_reuse(IO)

‎be/src/olap/CMakeLists.txt‎

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -23,100 +23,8 @@ set(EXECUTABLE_OUTPUT_PATH "${BUILD_DIR}/src/olap")
2323

2424
add_subdirectory(rowset)
2525

26-
add_library(Olap STATIC
27-
base_compaction.cpp
28-
base_tablet.cpp
29-
binlog_config.cpp
30-
bloom_filter.hpp
31-
block_column_predicate.cpp
32-
cold_data_compaction.cpp
33-
compaction.cpp
34-
compaction_permit_limiter.cpp
35-
cumulative_compaction.cpp
36-
cumulative_compaction_policy.cpp
37-
delete_bitmap_calculator.cpp
38-
delete_handler.cpp
39-
delta_writer.cpp
40-
hll.cpp
41-
inverted_index_parser.cpp
42-
itoken_extractor.cpp
43-
like_column_predicate.cpp
44-
key_coder.cpp
45-
lru_cache.cpp
46-
match_predicate.cpp
47-
memtable.cpp
48-
memtable_flush_executor.cpp
49-
merger.cpp
50-
null_predicate.cpp
51-
olap_meta.cpp
52-
olap_server.cpp
53-
schema_cache.cpp
54-
options.cpp
55-
page_cache.cpp
56-
push_handler.cpp
57-
reader.cpp
58-
row_cursor.cpp
59-
version_graph.cpp
60-
schema.cpp
61-
schema_change.cpp
62-
storage_engine.cpp
63-
data_dir.cpp
64-
short_key_index.cpp
65-
single_replica_compaction.cpp
66-
snapshot_manager.cpp
67-
tablet.cpp
68-
tablet_manager.cpp
69-
tablet_meta.cpp
70-
tablet_meta_manager.cpp
71-
tablet_schema.cpp
72-
tablet_schema_cache.cpp
73-
txn_manager.cpp
74-
types.cpp
75-
utils.cpp
76-
wrapper_field.cpp
77-
primary_key_index.cpp
78-
rowset/segment_v2/bitmap_index_reader.cpp
79-
rowset/segment_v2/bitmap_index_writer.cpp
80-
rowset/segment_v2/inverted_index_reader.cpp
81-
rowset/segment_v2/inverted_index_writer.cpp
82-
rowset/segment_v2/inverted_index_cache.cpp
83-
rowset/segment_v2/inverted_index_desc.cpp
84-
rowset/segment_v2/inverted_index_compound_directory.cpp
85-
rowset/segment_v2/inverted_index_compound_reader.cpp
86-
rowset/segment_v2/inverted_index_compaction.cpp
87-
rowset/segment_v2/bitshuffle_page.cpp
88-
rowset/segment_v2/bitshuffle_wrapper.cpp
89-
rowset/segment_v2/column_reader.cpp
90-
rowset/segment_v2/column_writer.cpp
91-
rowset/segment_v2/encoding_info.cpp
92-
rowset/segment_v2/index_page.cpp
93-
rowset/segment_v2/indexed_column_reader.cpp
94-
rowset/segment_v2/indexed_column_writer.cpp
95-
rowset/segment_v2/ordinal_page_index.cpp
96-
rowset/segment_v2/page_io.cpp
97-
rowset/segment_v2/binary_dict_page.cpp
98-
rowset/segment_v2/binary_prefix_page.cpp
99-
rowset/segment_v2/segment.cpp
100-
rowset/segment_v2/segment_iterator.cpp
101-
rowset/segment_v2/empty_segment_iterator.cpp
102-
rowset/segment_v2/segment_writer.cpp
103-
rowset/segment_v2/block_split_bloom_filter.cpp
104-
rowset/segment_v2/ngram_bloom_filter.cpp
105-
rowset/segment_v2/bloom_filter_index_reader.cpp
106-
rowset/segment_v2/bloom_filter_index_writer.cpp
107-
rowset/segment_v2/bloom_filter.cpp
108-
rowset/segment_v2/zone_map_index.cpp
109-
task/engine_batch_load_task.cpp
110-
task/engine_checksum_task.cpp
111-
task/engine_clone_task.cpp
112-
task/engine_storage_migration_task.cpp
113-
task/engine_publish_version_task.cpp
114-
task/engine_alter_tablet_task.cpp
115-
task/engine_index_change_task.cpp
116-
task/index_builder.cpp
117-
segment_loader.cpp
118-
storage_policy.cpp
119-
)
26+
file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS *.cpp)
27+
add_library(Olap STATIC ${SRC_FILES})
12028

12129
if (NOT USE_MEM_TRACKER)
12230
target_compile_options(Olap PRIVATE -Wno-unused-lambda-capture)

‎be/src/olap/rowset/segment_v2/ngram_bloom_filter.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <gen_cpp/segment_v2.pb.h>
2121
#include <glog/logging.h>
2222

23+
#include "gutil/hash/city.h"
2324
#include "gutil/strings/substitute.h"
24-
#include "util/cityhash102/city.h"
2525

2626
namespace doris {
2727
namespace segment_v2 {
@@ -54,8 +54,8 @@ Status NGramBloomFilter::init(const char* buf, uint32_t size, HashStrategyPB str
5454
}
5555

5656
void NGramBloomFilter::add_bytes(const char* data, uint32_t len) {
57-
size_t hash1 = CityHash_v1_0_2::CityHash64WithSeed(data, len, 0);
58-
size_t hash2 = CityHash_v1_0_2::CityHash64WithSeed(data, len, SEED_GEN);
57+
size_t hash1 = util_hash::CityHash64WithSeed(data, len, 0);
58+
size_t hash2 = util_hash::CityHash64WithSeed(data, len, SEED_GEN);
5959

6060
for (size_t i = 0; i < HASH_FUNCTIONS; ++i) {
6161
size_t pos = (hash1 + i * hash2 + i * i) % (8 * _size);

0 commit comments

Comments
 (0)