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

SCons: Prevent using `vsproj` option outside Windows
This commit is contained in:
Rémi Verschelde 2022-07-22 17:44:45 +02:00 committed by GitHub
commit 79463aa5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -854,6 +854,9 @@ if selected_platform in platform_list:
# Microsoft Visual Studio Project Generation # Microsoft Visual Studio Project Generation
if env["vsproj"]: 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"]] env["CPPPATH"] = [Dir(path) for path in env["CPPPATH"]]
methods.generate_vs_project(env, GetOption("num_jobs")) methods.generate_vs_project(env, GetOption("num_jobs"))
methods.generate_cpp_hint_file("cpp.hint") methods.generate_cpp_hint_file("cpp.hint")