[petsc-dev] __SDIR__ as string or not
Satish Balay
balay at mcs.anl.gov
Wed Feb 24 16:21:30 CST 2010
One potential issue is - if the dir has spaces - as on windows.. Hence the need for quotes for -D__INSDIR__='directory'
satish
On Wed, 24 Feb 2010, Barry Smith wrote:
>
> 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