diff options
author | Scott Graham <scottmg@chromium.org> | 2013-10-18 04:12:11 (GMT) |
---|---|---|
committer | Scott Graham <scottmg@chromium.org> | 2013-10-18 04:12:11 (GMT) |
commit | a90b279e469ec4ad3c57dff5075acecabc41e70a (patch) | |
tree | 293e0b77beb4f813f01636649c09cdd600fb147f /platform_helper.py | |
parent | 6f7ea464bb9161ce2e15deb97977886de152c12d (diff) | |
download | Ninja-a90b279e469ec4ad3c57dff5075acecabc41e70a.zip Ninja-a90b279e469ec4ad3c57dff5075acecabc41e70a.tar.gz Ninja-a90b279e469ec4ad3c57dff5075acecabc41e70a.tar.bz2 |
Fix compilation on VS2013
Diffstat (limited to 'platform_helper.py')
-rw-r--r-- | platform_helper.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/platform_helper.py b/platform_helper.py index b7447a1..dac7c02 100644 --- a/platform_helper.py +++ b/platform_helper.py @@ -21,8 +21,8 @@ def platforms(): return ['linux', 'darwin', 'freebsd', 'openbsd', 'solaris', 'sunos5', 'mingw', 'msvc', 'gnukfreebsd8', 'bitrig'] -class Platform( object ): - def __init__( self, platform): +class Platform(object): + def __init__(self, platform): self._platform = platform if not self._platform is None: return @@ -56,6 +56,14 @@ class Platform( object ): def is_msvc(self): return self._platform == 'msvc' + def msvc_needs_fs(self): + import subprocess + popen = subprocess.Popen('cl /nologo /?', + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + out, err = popen.communicate() + return '/FS ' in out + def is_windows(self): return self.is_mingw() or self.is_msvc() |