Subject: Passing cmake vars


> On Jun 19, 2020, at 4:35 PM, Bharath Vissapragada <[EMAIL PROTECTED]> wrote:
It's possible, but it's not particularly easy or well documented.  Probably something we should work, since this question comes up every-so-often.  This also reflects some of the earliest work on the engine and there are a lot of things we probably should have done different.  Hindsight 20/20! :)

Anyway, it basically requires setting up a personality file and providing a custom personality_modules function in it.  Off the top of my head, I think a minimal version would be something like:

===snip===
function personality_modules
{
  declare repostatus=$1
  declare testtype=$2
  declare module

  yetus_debug "Using custom personality_modules"
  yetus_debug "Personality: ${repostatus} ${testtype}"

 clear_personality_queue

  for module in "${CHANGED_MODULES[@]}"; do
personality_enqueue_module "${module}" [your extra params here]
  done
}
===snip===

repostatus will generally be one of branch or patch.
testtype will generally be the plugin executing.

This setup allows one to customize what extra params are passed based upon the state of the source tree.  It's extremely powerful but very unfriendly to people unfamiliar with the internals. :(  This feature is used extensively by some of the bigger projects that ship personalities with Apache Yetus itself.

BTW:  I don't know how well tested this is with make and related build tools.  If you have any issues, definitely file JIRAs.