The VS project generation frontend has a compatibility shim for old buildscripts accessing the Compiler.cxx or Compiler.cc attributes like
cfg = builder.DetectCompilers()
cxx = cfg.cxx
if cxx.like('gcc'):
# do something
The CompileShell is lacking a like method though, so generating VS files fails for such buildscripts.
C:\Users\User\Documents\GitHub\sourcepawn\vs>python ..\configure.py --enable-debug -g vs --build=all
Traceback (most recent call last):
File "..\configure.py", line 41, in <module>
run.Configure()
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\ambuild2\frontend\v2_0\prep.py", line 121, in Configure
if not builder.generate():
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\ambuild2\frontend\v2_0\base\gen.py", line 274, in generate
self.parseBuildScripts()
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\ambuild2\frontend\v2_0\base\gen.py", line 183, in parseBuildScripts
self.evalScript(root)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\ambuild2\frontend\v2_0\base\gen.py", line 243, in evalScript
exec(code, new_vars)
File "C:\Users\User\Documents\GitHub\sourcepawn\AMBuildScript", line 263, in <module>
root.configure()
File "C:\Users\User\Documents\GitHub\sourcepawn\AMBuildScript", line 34, in configure
if cxx.like('gcc'):
AttributeError: 'CompilerShell' object has no attribute 'like'
The VS project generation frontend has a compatibility shim for old buildscripts accessing the
Compiler.cxx
orCompiler.cc
attributes likeThe
CompileShell
is lacking alike
method though, so generating VS files fails for such buildscripts.