diff options
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/methods.py b/methods.py index 42eac7ca75..d8e90a8da5 100644 --- a/methods.py +++ b/methods.py @@ -660,3 +660,10 @@ def detect_darwin_sdk_path(platform, env): print("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name)) raise +def get_compiler_version(env): + version = decode_utf8(subprocess.check_output([env['CXX'], '--version']).strip()) + match = re.search('[0-9][0-9.]*', version) + if match is not None: + return match.group().split('.') + else: + return None |