[petsc-dev] __SDIR__ as string or not
Barry Smith
bsmith at mcs.anl.gov
Wed Feb 24 16:16:43 CST 2010
Currently the macro variable __SDIR__ is defined in conf/variables
with quotes around it, passed to the compiler as -
D__SDIR__="directory" and then used in PETSc source code as a string.
This works but is fragile to shells removing various quotes before
passing to the compiler.
Lisandro suggested changing the model to use -D__INSDIR__=directory
with no quotes and then in petscerror.h have
#define PetscStringize(a) #a
#define __SDIR__ PetscStringize(__INSDIR__)
Seems to work on my machine for C and C++ compilers so I am pushing
to petsc-dev. Please report problems ASAP.
Barry
More information about the petsc-dev
mailing list