未验证 提交 c1cad896 编写于 作者: R risemeup1 提交者: GitHub

optimize setup.py (#52621)

* optimize setup.py

* add ninja
上级 4500b64a
......@@ -685,6 +685,11 @@ def options_process(args, build_options):
def get_cmake_generator():
if os.getenv("GENERATOR"):
cmake_generator = os.getenv("GENERATOR")
if os.system('ninja --version') == 0:
print("Ninja has been installed,use ninja to compile Paddle now.")
else:
print("Ninja has not been installed,install it now.")
os.system('python -m pip install ninja')
else:
cmake_generator = "Unix Makefiles"
return cmake_generator
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册