[petsc-dev] [PATCH] config: test functions and headers only once
    Jed Brown 
    jedbrown at mcs.anl.gov
       
    Sat May  4 18:07:37 CDT 2013
    
    
  
Jed Brown <jedbrown at mcs.anl.gov> writes:
>  config/BuildSystem/config/functions.py | 4 ++++
>  config/BuildSystem/config/headers.py   | 4 ++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/config/BuildSystem/config/functions.py b/config/BuildSystem/config/functions.py
> index 30da45e..7b700cb 100644
> --- a/config/BuildSystem/config/functions.py
> +++ b/config/BuildSystem/config/functions.py
> @@ -197,5 +197,9 @@ choke me
>        self.executeTest(self.checkSignalHandlerType)
>      self.executeTest(self.checkFreeReturnType)
>      self.executeTest(self.checkVariableArgumentLists)
> +    try:
> +      self.functions = list(set(self.functions))
> +    except:
> +      pass
>      map(lambda function: self.executeTest(self.check, function), self.functions)
I merged a simpler version of this because we require Python-2.4, which
turns out to support set(), and we use it without guards in a few places
already.  (I forget which version was needed.)  The simpler patch below
is in 'next':
commit 8d170a4e15dd121552744a461c11f3b0d6d37794
Author: Jed Brown <jedbrown at mcs.anl.gov>
Date:   Sat May 4 17:51:07 2013 -0500
    config: test functions and headers only once
    
    Many functions and headers are mentioned in both BuildSystem and PETSc,
    thus being tested more than once.  Removing this redundancy speeds up my
    configure from 125 seconds to 110 seconds.
diff --git a/config/BuildSystem/config/functions.py b/config/BuildSystem/config/functions.py
index 30da45e..d934c7b 100644
--- a/config/BuildSystem/config/functions.py
+++ b/config/BuildSystem/config/functions.py
@@ -197,5 +197,5 @@ choke me
       self.executeTest(self.checkSignalHandlerType)
     self.executeTest(self.checkFreeReturnType)
     self.executeTest(self.checkVariableArgumentLists)
-    map(lambda function: self.executeTest(self.check, function), self.functions)
+    map(lambda function: self.executeTest(self.check, function), set(self.functions))
     return
diff --git a/config/BuildSystem/config/headers.py b/config/BuildSystem/config/headers.py
index e180eaa..1da32de 100644
--- a/config/BuildSystem/config/headers.py
+++ b/config/BuildSystem/config/headers.py
@@ -230,6 +230,6 @@ class Configure(config.base.Configure):
     self.executeTest(self.checkSysWait)
     self.executeTest(self.checkTime)
     self.executeTest(self.checkMath)
-    map(lambda header: self.executeTest(self.check, header), self.headers)
+    map(lambda header: self.executeTest(self.check, header), set(self.headers))
     self.executeTest(self.checkRecursiveMacros)
     return
    
    
More information about the petsc-dev
mailing list