[petsc-dev] meaning of PETSC_USE_EXTERN_CXX?
Jed Brown
jedbrown at mcs.anl.gov
Tue Mar 5 17:55:21 CST 2013
On Tue, Mar 5, 2013 at 5:49 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> From the below I am assuming that PETSC_USE_EXTERN_CXX is equivalent to
> --with-c-support Is this correct?
>
Yes,
config/PETSc/utilities/languages.py- '''Check c-support c++-support and
other misc tests'''
config/PETSc/utilities/languages.py- if self.clanguage == 'Cxx' and
self.framework.argDB['with-c-support']:
config/PETSc/utilities/languages.py- self.cSupport = 1
config/PETSc/utilities/languages.py: self.addDefine('USE_EXTERN_CXX',
'1')
config/PETSc/utilities/languages.py- self.framework.logPrint('Turning
off C++ name mangling')
config/PETSc/utilities/languages.py- else:
config/PETSc/utilities/languages.py- self.cSupport = 0
Matt, what is this about?
config/PETSc/utilities/languages.py- def configureExternC(self):
config/PETSc/utilities/languages.py- '''Protect C bindings from C++
mangling'''
config/PETSc/utilities/languages.py- if self.clanguage == 'C':
config/PETSc/utilities/languages.py: self.addDefine('USE_EXTERN_CXX','
')
config/PETSc/utilities/languages.py- return
config/PETSc/utilities/languages.py-
config/PETSc/utilities/languages.py- def configureFortranLanguage(self):
>
> And I assume that --with-c-support means that PETSc is compiled with
> C++ but does not use name mangling Is this correct?
>
Yes
>
> If the above two are correct does the name PETSC_USE_EXTERN_CXX
> actually correlate to what it means? Could it be changed to something
> meaningful?
>
--with-extern-c-interface (or --with-c-interface) and
PETSC_USE_EXTERN_C_INTERFACE?
>
> Please explain,
>
> Barry
>
>
> #if defined(PETSC_CLANGUAGE_CXX) && !defined(PETSC_USE_EXTERN_CXX) &&
> !defined(__cplusplus)
> #error "PETSc configured with --with-clanguage=c++ and NOT
> --with-c-support - it can be used only with a C++ compiler"
> #endif
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130305/26dd2645/attachment.html>
More information about the petsc-dev
mailing list