瀏覽代碼

Merge pull request #63310 from akien-mga/scons-vsproj-windows

SCons: Prevent using `vsproj` option outside Windows
Rémi Verschelde 3 年之前
父節點
當前提交
79463aa5de
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      SConstruct

+ 3 - 0
SConstruct

@@ -854,6 +854,9 @@ if selected_platform in platform_list:
 
     # Microsoft Visual Studio Project Generation
     if env["vsproj"]:
+        if os.name != "nt":
+            print("Error: The `vsproj` option is only usable on Windows with Visual Studio.")
+            Exit(255)
         env["CPPPATH"] = [Dir(path) for path in env["CPPPATH"]]
         methods.generate_vs_project(env, GetOption("num_jobs"))
         methods.generate_cpp_hint_file("cpp.hint")