MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Tools / run_cmake_command

Function run_cmake_command

scripts/update_deps.py:294–310  ·  view source on GitHub ↗
(cmake_cmd)

Source from the content-addressed store, hash-verified

292 return result.stdout
293
294def run_cmake_command(cmake_cmd):
295 # NOTE: Because CMake is an exectuable that runs executables
296 # stdout/stderr are mixed together. So this combines the outputs
297 # and prints them properly in case there is a non-zero exit code.
298 result = subprocess.run(cmake_cmd,
299 stdout = subprocess.PIPE,
300 stderr = subprocess.STDOUT,
301 text = True
302 )
303
304 if VERBOSE:
305 print(result.stdout)
306 print(f"CMake command: {cmake_cmd} ", flush=True)
307
308 if result.returncode != 0:
309 print(result.stdout, file=sys.stderr)
310 sys.exit(result.returncode)
311
312def escape(path):
313 return path.replace('\\', '/')

Callers 2

CMakeConfigMethod · 0.85
CMakeBuildMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected