[petsc-dev] C++ example

Matthew Knepley knepley at gmail.com
Sat Oct 1 15:30:52 CDT 2011


On Sat, Oct 1, 2011 at 12:40 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Matt, I want to add an example that shows ways to manage callback contexts
> from C++. It should work with a normal C build of PETSc (as long as a C++
> compiler was detected). This means that the compilation rule in the makefile
>
> .c.o .cpp.o .cxx.o .cc.o .C.o .ad.o:
>
> should be split apart into
>
> .c.o:
>
> and
>
> .cpp.o .cxx.o .cc.o .C.o:
>
> The latter will use the C++ compiler any time it is available. In the
> current model, this means that we should define PCXX in petscvariables.
>

I see no problem with that.


>
> Also, can we finally properly namespace everything in petscvariables? We
> can have a different include that has a bunch of lines like
>
> CC = ${PETSC_C_COMPILER}
> CFLAGS = ${PETSC_C_FLAGS}
> AR = ${PETSC_AR}
>
> in case the user wants to import all our variables into the global
> namespace.
>

I have no problem with that either. I am really not using make to build
anymore.

   Matt

-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111001/1e35bbaa/attachment.html>


More information about the petsc-dev mailing list