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<div>
<br></div><div>.c.o .cpp.o .cxx.o .cc.o .C.o .ad.o:</div><div><br></div><div>should be split apart into</div><div><br></div><div>.c.o:</div><div><br></div><div>and</div><div><br></div><div>.cpp.o .cxx.o .cc.o .C.o:</div><div>
<br></div><div>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.</div><div><br></div><div><br></div><div>Also, can we finally properly namespace everything in petscvariables? We can have a different include that has a bunch of lines like</div>
<div><br></div><div>CC = ${PETSC_C_COMPILER}</div><div>CFLAGS = ${PETSC_C_FLAGS}</div><div>AR = ${PETSC_AR}</div><div><br></div><div>in case the user wants to import all our variables into the global namespace.</div>