This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new b955da0597 GH-34188: [C++][Benchmark] Add missing
BENCHMARK_STATIC_DEFINE for bundled gbenchmark (#34194)
b955da0597 is described below
commit b955da0597d2899f58cfc7b2e842075ecf900b0f
Author: Sutou Kouhei <[email protected]>
AuthorDate: Wed Feb 15 20:15:24 2023 +0900
GH-34188: [C++][Benchmark] Add missing BENCHMARK_STATIC_DEFINE for bundled
gbenchmark (#34194)
### Rationale for this change
We need to specify `-DBENCHMARK_STATIC_DEFINE` to use gbenchmark as a
static library since gbenchmark 1.6.2.
### What changes are included in this PR?
This change specifies `BENCHMARK_STATIC_DEFINE` for bundled gbenchmark
explicitly.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* Closes: #34188
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 875c866822..47636c4d3a 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -2289,6 +2289,7 @@ macro(build_benchmark)
PROPERTIES IMPORTED_LOCATION "${GBENCHMARK_STATIC_LIB}"
INTERFACE_INCLUDE_DIRECTORIES
"${GBENCHMARK_INCLUDE_DIR}")
+ target_compile_definitions(benchmark::benchmark INTERFACE
"BENCHMARK_STATIC_DEFINE")
add_library(benchmark::benchmark_main STATIC IMPORTED)
set_target_properties(benchmark::benchmark_main