wutingcindy / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

Error when ProgramDataBaseFileName set in gyp. #224

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a gyp file with something like

'configurations': {
  'Debug': {
    'msvs_settings': {
      'VCCLCompilerTool': {
        'ProgramDataBaseFileName':'$(OutDir)$(ProjectName).pdb',

2. Run gyp (r995) on the above file to generate for VS2008.

What is the expected output? What do you see instead?
I would expect projects generated which place the pdbs in the out directory. 
Instead I get the error

Updating projects from gyp files...
{}
Traceback (most recent call last):
  File "gyp_skia", line 94, in <module>
    sys.exit(gyp.main(args))
  File "third_party\externals\gyp\pylib\gyp\__init__.py", line 472, in main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "third_party\externals\gyp\pylib\gyp\generator\msvs.py", line 1721, in GenerateOutput
    _GenerateProject(project, options, msvs_version)
  File "third_party\externals\gyp\pylib\gyp\generator\msvs.py", line 837, in _GenerateProject
    _GenerateMSVSProject(project, options, version)
  File "third_party\externals\gyp\pylib\gyp\generator\msvs.py", line 865, in _GenerateMSVSProject
    _AddConfigurationToMSVSProject(p, spec, config_type, config_name, config)
  File "third_party\externals\gyp\pylib\gyp\generator\msvs.py", line 1016, in _AddConfigurationToMSVSProject
    '$(IntDir)\\$(ProjectName)\\vc80.pdb')
  File "third_party\externals\gyp\pylib\gyp\generator\msvs.py", line 234, in _ToolAppend
    value, setting, tool_name, str(tool[setting])))
TypeError: Appending "$(IntDir)\$(ProjectName)\vc80.pdb" to a non-list setting 
"ProgramDataBaseFileName" for tool "VCCLC
ompilerTool" is not allowed, previous value: $(OutDir)$(ProjectName).pdb

What version of the product are you using? On what operating system?
Gyp r995, Windows7. The project I am working on is skia, which is currently 
running into this issue. (See 
http://code.google.com/p/skia/source/browse/trunk/gyp/common_conditions.gypi 
skia r2378 )

Please provide any additional information below.
I have attached a diff with my local fix. Basically, if someone has already set 
ProgramDataBaseFileName, that's what they want, don't over-write it.

From the error it also appears that _ToolAppend thinks ProgramDataBaseFileName 
is a list. However, that seems to be a different issue which shouldn't matter 
with this change.

I am not able to reproduce when generating for VS2010. That appears to be using 
the new code path.

Original issue reported on code.google.com by bunge...@google.com on 29 Sep 2011 at 6:29

Attachments:

GoogleCodeExporter commented 9 years ago
I moved up to r1057, same issue exists.

Original comment by bunge...@google.com on 30 Sep 2011 at 1:01

GoogleCodeExporter commented 9 years ago
Review at http://codereview.appspot.com/5164045/

Original comment by bunge...@google.com on 30 Sep 2011 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by bunge...@chromium.org on 3 Oct 2011 at 5:49