Fixed target info dumping.
This commit is contained in:
parent
8371f96d4a
commit
18293fdcf7
13
SConscript
13
SConscript
@ -522,8 +522,6 @@ def _version_to_string(version) -> str:
|
|||||||
return '.'.join([str(v) for v in version])
|
return '.'.join([str(v) for v in version])
|
||||||
|
|
||||||
def _finalize(env: Environment):
|
def _finalize(env: Environment):
|
||||||
if dump is not None:
|
|
||||||
_dump()
|
|
||||||
if generate_project:
|
if generate_project:
|
||||||
_generate_project(generate_project)
|
_generate_project(generate_project)
|
||||||
Exit(0)
|
Exit(0)
|
||||||
@ -546,6 +544,8 @@ def _finalize(env: Environment):
|
|||||||
}
|
}
|
||||||
}, f)
|
}, f)
|
||||||
|
|
||||||
|
if dump is not None:
|
||||||
|
_dump()
|
||||||
|
|
||||||
for target in env['SPP_TARGETS']:
|
for target in env['SPP_TARGETS']:
|
||||||
_build_target(target)
|
_build_target(target)
|
||||||
@ -731,8 +731,14 @@ def _generate_project(project_type: str) -> None:
|
|||||||
|
|
||||||
def _get_target_property(build_type: str, target: str, path: str) -> Any:
|
def _get_target_property(build_type: str, target: str, path: str) -> Any:
|
||||||
import subprocess
|
import subprocess
|
||||||
output = subprocess.check_output((shutil.which('scons'), '--silent', f'--build_type={build_type}', '--dump=targets', '--dump_format=json', f'--dump_path={target}/{path}'), text=True).strip()
|
cmd = (shutil.which('scons'), '--silent', f'--build_type={build_type}', '--dump=targets', '--dump_format=json', f'--dump_path={target}/{path}')
|
||||||
|
output = subprocess.check_output(cmd, text=True).strip()
|
||||||
|
try:
|
||||||
return json.loads(output)
|
return json.loads(output)
|
||||||
|
except json.JSONDecodeError as e:
|
||||||
|
env.Warn(f'Command: {cmd}')
|
||||||
|
env.Warn(f'Output: {output}')
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
executables = _get_executables()
|
executables = _get_executables()
|
||||||
@ -1135,6 +1141,7 @@ env.Append(CXXFLAGS = [])
|
|||||||
env.Append(CPPPATH = [])
|
env.Append(CPPPATH = [])
|
||||||
env.Append(CPPDEFINES = [])
|
env.Append(CPPDEFINES = [])
|
||||||
env.Append(LINKFLAGS = [])
|
env.Append(LINKFLAGS = [])
|
||||||
|
env.Append(LIBS = [])
|
||||||
|
|
||||||
# init SPP environment variables
|
# init SPP environment variables
|
||||||
env['SPP_DIR'] = _spp_dir.abspath
|
env['SPP_DIR'] = _spp_dir.abspath
|
||||||
|
Loading…
x
Reference in New Issue
Block a user