Commits

Jed Brown committed 123864f

config OpenMP: check for C++ flag any time the compiler is available

Otherwise C++ source files such as matelem.cxx are compiled without the
-fopenmp flag, which causes breakage due to non-TLS variables when using
threads.

Comments (2)

Files changed (1)

config/PETSc/packages/openmp.py

       self.setCompilers.pushLanguage('FC')
       self.setCompilers.addCompilerFlag(ompflag)
       self.setCompilers.popLanguage()
-    if self.languages.clanguage == 'Cxx':
+    if hasattr(self.compilers, 'CXX'):
       self.setCompilers.pushLanguage('Cxx')
       self.setCompilers.addCompilerFlag(ompflag)
       if self.setCompilers.checkLinkerFlag(ompflag):