cmake: build-id: specify current working directory
This commit is contained in:
@@ -11,6 +11,10 @@ if (NOT DEFINED bshell_verbose)
|
|||||||
set(bshell_verbose 0)
|
set(bshell_verbose 0)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (NOT DEFINED bshell_enable_floating_point)
|
||||||
|
set(bshell_enable_floating_point 1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
set(required_fx_assemblies fx.runtime fx.collections)
|
set(required_fx_assemblies fx.runtime fx.collections)
|
||||||
|
|
||||||
if (bshell_interactive)
|
if (bshell_interactive)
|
||||||
@@ -23,6 +27,7 @@ find_package(FX REQUIRED COMPONENTS ${required_fx_assemblies})
|
|||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${Python_EXECUTABLE}
|
COMMAND ${Python_EXECUTABLE}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tools/build-id.py
|
${CMAKE_CURRENT_SOURCE_DIR}/tools/build-id.py
|
||||||
|
--source-dir "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
OUTPUT_VARIABLE bshell_version)
|
OUTPUT_VARIABLE bshell_version)
|
||||||
message(STATUS "B Shell version: ${bshell_version}")
|
message(STATUS "B Shell version: ${bshell_version}")
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -26,7 +26,8 @@ def get_arg(name):
|
|||||||
return ''
|
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)
|
build_id = '{}'.format(current_tag)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user