ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/localize.py
(Generate patch)

Comparing localize.py (file contents):
Revision 1.18 by arta, Wed May 7 18:45:36 2014 UTC vs.
Revision 1.19 by arta, Thu May 22 23:01:34 2014 UTC

# Line 676 | Line 676 | def configureComps(defs, mDefs):
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)
# Line 687 | Line 688 | def configureComps(defs, mDefs):
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:
# Line 699 | Line 700 | def configureComps(defs, mDefs):
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)
# Line 720 | Line 722 | def configureComps(defs, mDefs):
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)
# Line 728 | Line 731 | def configureComps(defs, mDefs):
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:
# Line 739 | Line 742 | def configureComps(defs, mDefs):
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)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines