You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2025/05/09 21:08:15 UTC
(arrow) branch main updated: GH-46367: [C++] Prevent Meson from using git info if built as subproject (#46368)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 0c90264437 GH-46367: [C++] Prevent Meson from using git info if built as subproject (#46368)
0c90264437 is described below
commit 0c902644376138e8c9f117541a58177aaf98dcde
Author: William Ayd <wi...@icloud.com>
AuthorDate: Fri May 9 17:08:09 2025 -0400
GH-46367: [C++] Prevent Meson from using git info if built as subproject (#46368)
### Rationale for this change
When used as a subproject, the Arrow Meson configuration may end up pulling git version information from the main project
### What changes are included in this PR?
This prevents Meson from gathering git information when Arrow is built as a subproject
### Are these changes tested?
Yes
### Are there any user-facing changes?
No
* GitHub Issue: #46367
Authored-by: Will Ayd <wi...@icloud.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
cpp/meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpp/meson.build b/cpp/meson.build
index 0a11662636..f4d006d31f 100644
--- a/cpp/meson.build
+++ b/cpp/meson.build
@@ -47,12 +47,12 @@ cpp_args = cpp_compiler.get_supported_arguments(project_args)
add_project_arguments(cpp_args, language: 'cpp')
git_id = get_option('git_id')
-if git_id == ''
+if git_id == '' and not meson.is_subproject()
git_id = run_command('git', 'log', '-n1', '--format=%H', check: false).stdout().strip()
endif
git_description = get_option('git_description')
-if git_description == ''
+if git_description == '' and not meson.is_subproject()
git_description = run_command('git', 'describe', '--tags', check: false).stdout().strip()
endif