Fix PGI compiler detection on PowerPC (#4150)

This commit is contained in:
Adam J. Stewart 2017-05-08 00:04:52 -05:00 committed by becker33
parent 4e44d39f1a
commit cf93f49462

View File

@ -61,12 +61,20 @@ def pic_flag(self):
@classmethod
def default_version(cls, comp):
"""The '-V' option works for all the PGI compilers.
"""The ``-V`` option works for all the PGI compilers.
Output looks like this::
pgcc 15.10-0 64-bit target on x86-64 Linux -tp sandybridge
The Portland Group - PGI Compilers and Tools
Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved.
on x86-64, and::
pgcc 17.4-0 linuxpower target on Linuxpower
PGI Compilers and Tools
Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
on PowerPC.
"""
return get_compiler_version(
comp, '-V', r'pg[^ ]* ([^ ]+) \d\d\d?-bit target')
comp, '-V', r'pg[^ ]* ([0-9.-]+) [^ ]+ target on ')