OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """ | 5 """ |
6 This module helps emulate Visual Studio 2008 behavior on top of other | 6 This module helps emulate Visual Studio 2008 behavior on top of other |
7 build systems, primarily ninja. | 7 build systems, primarily ninja. |
8 """ | 8 """ |
9 | 9 |
10 import os | 10 import os |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 def AdjustIncludeDirs(self, include_dirs, config): | 312 def AdjustIncludeDirs(self, include_dirs, config): |
313 """Updates include_dirs to expand VS specific paths, and adds the system | 313 """Updates include_dirs to expand VS specific paths, and adds the system |
314 include dirs used for platform SDK and similar.""" | 314 include dirs used for platform SDK and similar.""" |
315 config = self._TargetConfig(config) | 315 config = self._TargetConfig(config) |
316 includes = include_dirs + self.msvs_system_include_dirs[config] | 316 includes = include_dirs + self.msvs_system_include_dirs[config] |
317 includes.extend(self._Setting( | 317 includes.extend(self._Setting( |
318 ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[])) | 318 ('VCCLCompilerTool', 'AdditionalIncludeDirectories'), config, default=[])) |
319 return [self.ConvertVSMacros(p, config=config) for p in includes] | 319 return [self.ConvertVSMacros(p, config=config) for p in includes] |
320 | 320 |
| 321 def AdjustMidlIncludeDirs(self, midl_include_dirs, config): |
| 322 """Updates midl_include_dirs to expand VS specific paths, and adds any |
| 323 AdditionalIncludeDirectories specified in VCMIDLTool.""" |
| 324 config = self._TargetConfig(config) |
| 325 includes = midl_include_dirs + self._Setting( |
| 326 ('VCMIDLTool', 'AdditionalIncludeDirectories'), config, default=[]) |
| 327 return [self.ConvertVSMacros(p, config=config) for p in includes] |
| 328 |
321 def GetComputedDefines(self, config): | 329 def GetComputedDefines(self, config): |
322 """Returns the set of defines that are injected to the defines list based | 330 """Returns the set of defines that are injected to the defines list based |
323 on other VS settings.""" | 331 on other VS settings.""" |
324 config = self._TargetConfig(config) | 332 config = self._TargetConfig(config) |
325 defines = [] | 333 defines = [] |
326 if self._ConfigAttrib(['CharacterSet'], config) == '1': | 334 if self._ConfigAttrib(['CharacterSet'], config) == '1': |
327 defines.extend(('_UNICODE', 'UNICODE')) | 335 defines.extend(('_UNICODE', 'UNICODE')) |
328 if self._ConfigAttrib(['CharacterSet'], config) == '2': | 336 if self._ConfigAttrib(['CharacterSet'], config) == '2': |
329 defines.append('_MBCS') | 337 defines.append('_MBCS') |
330 defines.extend(self._Setting( | 338 defines.extend(self._Setting( |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 | 1026 |
1019 # To determine processor word size on Windows, in addition to checking | 1027 # To determine processor word size on Windows, in addition to checking |
1020 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current | 1028 # PROCESSOR_ARCHITECTURE (which reflects the word size of the current |
1021 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which | 1029 # process), it is also necessary to check PROCESSOR_ARCHITEW6432 (which |
1022 # contains the actual word size of the system when running thru WOW64). | 1030 # contains the actual word size of the system when running thru WOW64). |
1023 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or | 1031 if ('64' in os.environ.get('PROCESSOR_ARCHITECTURE', '') or |
1024 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): | 1032 '64' in os.environ.get('PROCESSOR_ARCHITEW6432', '')): |
1025 default_variables['MSVS_OS_BITS'] = 64 | 1033 default_variables['MSVS_OS_BITS'] = 64 |
1026 else: | 1034 else: |
1027 default_variables['MSVS_OS_BITS'] = 32 | 1035 default_variables['MSVS_OS_BITS'] = 32 |
OLD | NEW |