core icon indicating copy to clipboard operation
core copied to clipboard

make ENABLE_ZOLTAN available to preprocessor

Open JaredCrean2 opened this issue 5 years ago • 3 comments

This makes the ENABLE_ZOLTAN flag passed to CMake available to the C pre-processor (via a CMake generated header). The motivation for this is trying to make code work with or without Zoltan, ie:

#ifdef ENABLE_ZOLTAN
  apf::Splitter* splitter = apf::makeZoltanSplitter(...);
#else 
  apf::Splitter* splitter = Parma_MakeRibSplitter(...);
#fi
# do stuff with splitter

JaredCrean2 avatar Aug 21 '19 00:08 JaredCrean2

We should probably call this PUMI_HAS_ZOLTAN or something like that to prevent conflicts with other packages that have a macro/pre-processor definition for zoltan.

cwsmith avatar Oct 30 '19 15:10 cwsmith

Seems reasonable, although I may not get to this for a few weeks (I'm supposed to defend 2 weeks from today).

JaredCrean2 avatar Oct 30 '19 16:10 JaredCrean2

This was added as part of #342.

cwsmith avatar Jul 18 '21 19:07 cwsmith

@cwsmith I think this can be closed.

bobpaw avatar Dec 22 '23 18:12 bobpaw

Yes, thank you.

The pre-processor flag PUMI_HAS_ZOLTAN was added here: https://github.com/SCOREC/core/pull/342/commits/3943ce4f6cc2fcd89adeb30d9903db18a756aad1

cwsmith avatar Dec 22 '23 19:12 cwsmith