[petsc-dev] configureLibrary fails for c++11 projects

Stefano Zampini stefano.zampini at gmail.com
Tue Mar 23 06:24:00 CDT 2021


Just tried out of main, and and the include tests of a c++11 project fail
Below my fix, if we agree on, I'll make a MR

diff --git a/config/BuildSystem/config/compilers.py
b/config/BuildSystem/config/compilers.py
index c96967e..44e4657 100644
--- a/config/BuildSystem/config/compilers.py
+++ b/config/BuildSystem/config/compilers.py
@@ -527,6 +527,8 @@ class Configure(config.base.Configure):
         if self.setCompilers.checkCompilerFlag(flag, includes,
body+body14):
           newflag = getattr(self.setCompilers,LANG+'FLAGS') + ' ' + flag #
append flag to the old
           setattr(self.setCompilers,LANG+'FLAGS',newflag)
+          newflag = getattr(self.setCompilers,LANG+'PPFLAGS') + ' ' + flag
# append flag to the old
+          setattr(self.setCompilers,LANG+'PPFLAGS',newflag)
           cxxdialect = 'C++14'
           self.addDefine('HAVE_'+LANG+'_DIALECT_CXX14',1)
           self.addDefine('HAVE_'+LANG+'_DIALECT_CXX11',1)
@@ -546,6 +548,8 @@ class Configure(config.base.Configure):
         if self.setCompilers.checkCompilerFlag(flag, includes, body):
           newflag = getattr(self.setCompilers,LANG+'FLAGS') + ' ' + flag #
append flag to the old
           setattr(self.setCompilers,LANG+'FLAGS',newflag)
+          newflag = getattr(self.setCompilers,LANG+'PPFLAGS') + ' ' + flag
# append flag to the old
+          setattr(self.setCompilers,LANG+'PPFLAGS',newflag)
           cxxdialect = 'C++11'
           self.addDefine('HAVE_'+LANG+'_DIALECT_CXX11',1)
           break


-- 
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20210323/9c297e9e/attachment.html>


More information about the petsc-dev mailing list