Open
Description
Describe the bug
Calling Evnrionment.MSVSProject multiple times with different variants does not create a MSVS project file with multiple build targets, as described in the manual
Required information
- Mailing list post with additional details
- Version 4.1.0 (also confirmed on 3.1.2)
- python.org version 3.8.5
- SCons installed with scons-local package from scons.org on Windows 10
Reproduction SConstruct
import os
from SCons.Script import *
env = Environment()
for variant in ["debug", "release"]:
env.MSVSProject(
target="hello" + env["MSVSPROJECTSUFFIX"],
srcs="hello.cpp",
buildtarget=os.path.join(variant, "hello.exe"),
variant=variant,
)
This gives the following output:
> scons
scons: Reading SConscript files ...
scons: warning: Two different environments were specified for target hello.vcxproj, but they appear to have the same action: GenerateProject(target, source, env)
File "SConstruct", line 7, in <module>
scons: *** Multiple ways to build the same target were specified for: hello.vcxproj (from ['prj_inputs:"python.exe" -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, \'Lib\', \'site-packages\', \'scons-4.1.0\'), join(sys.prefix, \'scons-4.1.0\'), join(sys.prefix, \'Lib\', \'site-packages\', \'scons\'), join(sys.prefix, \'scons\') ] + sys.path; import SCons.Script; SCons.Script.main()" -C "." -f SConstructutf-8; ppdefs: incpath: "debug\\hello.exe" "debug" "hello.cpp "hello.vcxproj"'] and from ['prj_inputs:"python.exe" -c "from os.path import join; import sys; sys.path = [ join(sys.prefix, \'Lib\', \'site-packages\', \'scons-4.1.0\'), join(sys.prefix, \'scons-4.1.0\'), join(sys.prefix, \'Lib\', \'site-packages\', \'scons\'), join(sys.prefix, \'scons\') ] + sys.path; import SCons.Script; SCons.Script.main()" -C "." -f SConstructutf-8; ppdefs: incpath: "release\\hello.exe" "release" "hello.cpp "hello.vcxproj"'])
File "SConstruct", line 7, in <module>