mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
improve run_cmake.py on Windows
Summary: Update the generated `run_cmake.py` script to use `subprocess.run()` instead of `os.execve()`. The `os.execve()` call doesn't really do what we want on Windows: this causes the script to exit while CMake is still running, resulting in confusing output. During the build step it also did not work correctly with `vcvarsall.bat`, and using `subprocess` also solves this. Reviewed By: wez Differential Revision: D17493897 fbshipit-source-id: e0477627fc1824b0efcb1fa5a782d207853bcae8
This commit is contained in:
committed by
Facebook Github Bot
parent
d2a4416275
commit
0f64956336
@@ -202,7 +202,8 @@ class CMakeBuilder(BuilderBase):
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
CMAKE = {cmake!r}
|
||||
SRC_DIR = {src_dir!r}
|
||||
@@ -268,8 +269,8 @@ def main():
|
||||
|
||||
cmd_str = " ".join(full_cmd)
|
||||
print("Running: %r" % (cmd_str,))
|
||||
os.chdir(BUILD_DIR)
|
||||
os.execve(CMAKE, full_cmd, env)
|
||||
proc = subprocess.run(full_cmd, env=env, cwd=BUILD_DIR)
|
||||
sys.exit(proc.returncode)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Reference in New Issue
Block a user