676 |
|
minor = matchobj.group(2) |
677 |
|
if isVersion(int(major), int(minor), ICC_MAJOR, ICC_MINOR): |
678 |
|
hasicc = bool(1) |
679 |
< |
|
679 |
> |
|
680 |
|
# Try gcc. |
681 |
|
if not hasicc: |
682 |
+ |
rv = bool(0) |
683 |
|
cmd = 'gcc -v 2>&1' |
684 |
|
try: |
685 |
|
ret = check_output(cmd, shell=True) |
688 |
|
print('Command ' + "'" + cmd + "'" + ' ran improperly.') |
689 |
|
rv = bool(1) |
690 |
|
|
691 |
< |
if rv == bool(0): |
691 |
> |
if not rv: |
692 |
|
regexp = re.compile(r".+gcc\s+version\s+(\d+)\.(\d+)", re.DOTALL) |
693 |
|
matchobj = regexp.match(ret) |
694 |
|
if matchobj is None: |
700 |
|
hasgcc = bool(1) |
701 |
|
|
702 |
|
# Try ifort. |
703 |
+ |
rv = bool(0) |
704 |
|
cmd = 'ifort --version 2>&1' |
705 |
|
try: |
706 |
|
ret = check_output(cmd, shell=True) |
722 |
|
|
723 |
|
# Try gfortran |
724 |
|
if not hasifort: |
725 |
+ |
rv = bool(0) |
726 |
|
cmd = 'gfortran -v 2>&1' |
727 |
|
try: |
728 |
|
ret = check_output(cmd, shell=True) |
731 |
|
print('Command ' + "'" + cmd + "'" + ' ran improperly.') |
732 |
|
rv = bool(1) |
733 |
|
|
734 |
< |
if rv == bool(0): |
734 |
> |
if not rv: |
735 |
|
regexp = re.compile(r".+gcc\s+version\s+(\d+)\.(\d+)", re.DOTALL) |
736 |
|
matchobj = regexp.match(ret) |
737 |
|
if matchobj is None: |
742 |
|
if isVersion(int(major), int(minor), GFORT_MAJOR, GFORT_MINOR): |
743 |
|
hasgfort = bool(1) |
744 |
|
|
745 |
< |
# Append the compiler make variables to the make file |
745 |
> |
# Append the compiler make variables to the make file |
746 |
> |
rv = bool(0) |
747 |
> |
|
748 |
|
if not hasicc and not hasgcc: |
749 |
|
print('Fatal error: Acceptable C compiler not found! You will be unable to build the DRMS library.', file=sys.stderr) |
750 |
|
rv = bool(1) |