OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2009 Google Inc. All rights reserved. | 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import ntpath | 7 import ntpath |
8 import posixpath | 8 import posixpath |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 _AddCustomBuildTool(p, spec, | 1167 _AddCustomBuildTool(p, spec, |
1168 inputs=a.get('inputs', []), | 1168 inputs=a.get('inputs', []), |
1169 outputs=a.get('outputs', []), | 1169 outputs=a.get('outputs', []), |
1170 description=a.get('message', a['action_name']), | 1170 description=a.get('message', a['action_name']), |
1171 cmd=cmd) | 1171 cmd=cmd) |
1172 | 1172 |
1173 | 1173 |
1174 def _AddRunAs(p, spec, user_file): | 1174 def _AddRunAs(p, spec, user_file): |
1175 # Add run_as and test targets. | 1175 # Add run_as and test targets. |
1176 has_run_as = False | 1176 has_run_as = False |
1177 if spec.get('run_as') or int(spec.get('test', 0)): | 1177 run_as = spec.get('run_as') |
| 1178 if run_as: |
1178 has_run_as = True | 1179 has_run_as = True |
1179 run_as = spec.get('run_as', { | |
1180 'action' : ['$(TargetPath)', '--gtest_print_time'], | |
1181 }) | |
1182 working_directory = run_as.get('working_directory', '.') | 1180 working_directory = run_as.get('working_directory', '.') |
1183 action = run_as.get('action', []) | 1181 action = run_as.get('action', []) |
1184 environment = run_as.get('environment', []) | 1182 environment = run_as.get('environment', []) |
1185 for config_name, c_data in spec['configurations'].iteritems(): | 1183 for config_name, c_data in spec['configurations'].iteritems(): |
1186 _SetRunAs(user_file, config_name, c_data, | 1184 _SetRunAs(user_file, config_name, c_data, |
1187 action, environment, working_directory) | 1185 action, environment, working_directory) |
1188 return has_run_as | 1186 return has_run_as |
1189 | 1187 |
1190 | 1188 |
1191 def _AddCopies(p, spec): | 1189 def _AddCopies(p, spec): |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 # Create folder hierarchy. | 1409 # Create folder hierarchy. |
1412 root_entries = _GatherSolutionFolders( | 1410 root_entries = _GatherSolutionFolders( |
1413 project_objs, flat=msvs_version.FlatSolution()) | 1411 project_objs, flat=msvs_version.FlatSolution()) |
1414 # Create solution. | 1412 # Create solution. |
1415 sln = MSVSNew.MSVSSolution(sln_path, | 1413 sln = MSVSNew.MSVSSolution(sln_path, |
1416 entries=root_entries, | 1414 entries=root_entries, |
1417 variants=configs, | 1415 variants=configs, |
1418 websiteProperties=False, | 1416 websiteProperties=False, |
1419 version=msvs_version) | 1417 version=msvs_version) |
1420 sln.Write() | 1418 sln.Write() |
OLD | NEW |