cmake: build-id: specify current working directory

This commit is contained in:
2026-05-31 17:33:02 +01:00
parent 4a087d1000
commit 6548c3283b
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -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}")
+2 -1
View File
@@ -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)