From 6548c3283bb7e088b8b3ff15f8877d00282d5616 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sun, 31 May 2026 17:33:02 +0100 Subject: [PATCH] cmake: build-id: specify current working directory --- CMakeLists.txt | 5 +++++ tools/build-id.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cece18..7e041d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ if (NOT DEFINED bshell_verbose) set(bshell_verbose 0) endif () +if (NOT DEFINED bshell_enable_floating_point) + set(bshell_enable_floating_point 1) +endif () + set(required_fx_assemblies fx.runtime fx.collections) if (bshell_interactive) @@ -23,6 +27,7 @@ find_package(FX REQUIRED COMPONENTS ${required_fx_assemblies}) execute_process( COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tools/build-id.py + --source-dir "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE bshell_version) message(STATUS "B Shell version: ${bshell_version}") diff --git a/tools/build-id.py b/tools/build-id.py index a1bc1df..df784ec 100755 --- a/tools/build-id.py +++ b/tools/build-id.py @@ -26,7 +26,8 @@ def get_arg(name): return '' -current_tag = subprocess.check_output(['git', 'describe', '--tags', '--abbrev=0']).decode('utf-8').strip() +source_dir = get_arg('source-dir') +current_tag = subprocess.check_output(['git', 'describe', '--tags', '--abbrev=0'], cwd=source_dir).decode('utf-8').strip() build_id = '{}'.format(current_tag)