[Numpy-svn] r4432 - branches/numpy.scons/numpy/distutils/scons

numpy-svn@scip... numpy-svn@scip...
Sat Nov 10 21:05:00 CST 2007


Author: cdavid
Date: 2007-11-10 21:04:55 -0600 (Sat, 10 Nov 2007)
New Revision: 4432

Modified:
   branches/numpy.scons/numpy/distutils/scons/fortran_scons.py
Log:
Handle missing fortran compiler case in dummy main fortran checkers

Modified: branches/numpy.scons/numpy/distutils/scons/fortran_scons.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/fortran_scons.py	2007-11-11 02:57:05 UTC (rev 4431)
+++ branches/numpy.scons/numpy/distutils/scons/fortran_scons.py	2007-11-11 03:04:55 UTC (rev 4432)
@@ -109,6 +109,12 @@
 
 # If need a dummy main
 def _CheckFDummyMain(context, fcomp):
+    if not context.env.has_key(fcomp):
+        context.Message('No %s compiler defined: cannot check dummy main ')
+        return 0
+    else:
+        context.Message('Checking if %s needs dummy main - ' % context.env[fcomp])
+
     fcn_tmpl = """
 int %s() { return 0; }
 """
@@ -136,7 +142,6 @@
 
 # XXX: refactor those by using function templates
 def CheckF77DummyMain(context):
-    context.Message('Checking if %s needs dummy main - ' % context.env['F77'])
     res, m = _CheckFDummyMain(context, 'F77')
     if res:
         context.Result("%s." % str(m))
@@ -147,7 +152,6 @@
     return res
 
 def CheckF90DummyMain(context):
-    context.Message('Checking if %s needs dummy main - ' % context.env['F90'])
     res, m = _CheckFDummyMain(context, 'F90')
     if res:
         context.Result("%s." % str(m))



More information about the Numpy-svn mailing list