From 6848eafb399834dfddd53b9f69fd8408e73659fa Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sat, 6 May 2023 17:06:44 +0000 Subject: [PATCH 1/3] Cleanup utils build --- utils/CMakeLists.txt | 11 ++--------- utils/keeper-bench/CMakeLists.txt | 2 +- utils/keeper-data-dumper/CMakeLists.txt | 5 +++++ utils/memcpy-bench/CMakeLists.txt | 6 ++++++ 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index bb9d4c88fa1..5519b9bb983 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -26,13 +26,6 @@ if (NOT DEFINED ENABLE_UTILS OR ENABLE_UTILS) add_subdirectory (wal-dump) add_subdirectory (check-mysql-binlog) add_subdirectory (keeper-bench) - - if (TARGET ch_contrib::nuraft) - add_subdirectory (keeper-data-dumper) - endif () - - # memcpy_jart.S contains position dependent code - if (NOT CMAKE_POSITION_INDEPENDENT_CODE AND OS_LINUX AND ARCH_AMD64) - add_subdirectory (memcpy-bench) - endif () + add_subdirectory (keeper-data-dumper) + add_subdirectory (memcpy-bench) endif () diff --git a/utils/keeper-bench/CMakeLists.txt b/utils/keeper-bench/CMakeLists.txt index 87fa64b1761..49ce2068246 100644 --- a/utils/keeper-bench/CMakeLists.txt +++ b/utils/keeper-bench/CMakeLists.txt @@ -1,7 +1,7 @@ if (NOT TARGET ch_contrib::rapidjson) message (${RECONFIGURE_MESSAGE_LEVEL} "Not building keeper-bench due to rapidjson is disabled") return() -endif() +endif () clickhouse_add_executable(keeper-bench Generator.cpp Runner.cpp Stats.cpp main.cpp) target_link_libraries(keeper-bench PRIVATE clickhouse_common_config_no_zookeeper_log ch_contrib::rapidjson) diff --git a/utils/keeper-data-dumper/CMakeLists.txt b/utils/keeper-data-dumper/CMakeLists.txt index 1f55e50e68e..8c260c2122e 100644 --- a/utils/keeper-data-dumper/CMakeLists.txt +++ b/utils/keeper-data-dumper/CMakeLists.txt @@ -1,2 +1,7 @@ +if (NOT TARGET ch_contrib::nuraft) + message (${RECONFIGURE_MESSAGE_LEVEL} "Not building keeper-data-dumper due to nuraft is disabled") + return () +endif () + clickhouse_add_executable(keeper-data-dumper main.cpp) target_link_libraries(keeper-data-dumper PRIVATE dbms) diff --git a/utils/memcpy-bench/CMakeLists.txt b/utils/memcpy-bench/CMakeLists.txt index 460a06ba851..7227728e849 100644 --- a/utils/memcpy-bench/CMakeLists.txt +++ b/utils/memcpy-bench/CMakeLists.txt @@ -1,3 +1,9 @@ +# memcpy_jart.S contains position dependent code +if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT OS_LINUX OR NOT ARCH_AMD64) + message (${RECONFIGURE_MESSAGE_LEVEL} "Not building memcpy-bench due to PIC enabled or not Linux or not x86") + return () +endif () + enable_language(ASM) clickhouse_add_executable (memcpy-bench From 76cf206efe9011cdfdeba1a2d075d827587c0eb3 Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sat, 6 May 2023 20:26:27 +0000 Subject: [PATCH 2/3] Fix build when memcpy-bench isn't available --- utils/memcpy-bench/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/memcpy-bench/CMakeLists.txt b/utils/memcpy-bench/CMakeLists.txt index 7227728e849..f2cc4bdc8c5 100644 --- a/utils/memcpy-bench/CMakeLists.txt +++ b/utils/memcpy-bench/CMakeLists.txt @@ -1,6 +1,5 @@ # memcpy_jart.S contains position dependent code if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT OS_LINUX OR NOT ARCH_AMD64) - message (${RECONFIGURE_MESSAGE_LEVEL} "Not building memcpy-bench due to PIC enabled or not Linux or not x86") return () endif () From fc4288d3ac3d85e5a09cea41596379a4b7dfc35b Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sun, 7 May 2023 06:54:21 +0000 Subject: [PATCH 3/3] Fix FreeBSD build --- utils/keeper-data-dumper/CMakeLists.txt | 2 +- utils/memcpy-bench/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/keeper-data-dumper/CMakeLists.txt b/utils/keeper-data-dumper/CMakeLists.txt index 8c260c2122e..136d6f2268c 100644 --- a/utils/keeper-data-dumper/CMakeLists.txt +++ b/utils/keeper-data-dumper/CMakeLists.txt @@ -1,5 +1,5 @@ if (NOT TARGET ch_contrib::nuraft) - message (${RECONFIGURE_MESSAGE_LEVEL} "Not building keeper-data-dumper due to nuraft is disabled") + message (WARNING "Not building keeper-data-dumper due to nuraft is disabled") return () endif () diff --git a/utils/memcpy-bench/CMakeLists.txt b/utils/memcpy-bench/CMakeLists.txt index f2cc4bdc8c5..c0b0b8a589d 100644 --- a/utils/memcpy-bench/CMakeLists.txt +++ b/utils/memcpy-bench/CMakeLists.txt @@ -1,5 +1,6 @@ # memcpy_jart.S contains position dependent code if (CMAKE_POSITION_INDEPENDENT_CODE OR NOT OS_LINUX OR NOT ARCH_AMD64) + message (WARNING "Not building memcpy-bench due to PIC enabled or not Linux or not x86") return () endif ()