Skip to content

Commit

Permalink
config.l: dependency checks for booleans
Browse files Browse the repository at this point in the history
Disable the boolean option that has its dependency disabled.
This fixes the case where GENERATE_TREE_VIEW is set to TRUE
even when its dependency GENERATE_HTML is FALSE.

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
  • Loading branch information
groleo committed Mar 6, 2014
1 parent 8eeaae0 commit 5d64c0e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/config.l
Expand Up @@ -1590,6 +1590,25 @@ void Config::check()
}

checkFileName("GENERATE_TAGFILE");

// sanity check if all depends relations are valid
QListIterator<ConfigOption> it = iterator();
ConfigOption *option;
for (it.toFirst();(option=it.current());++it)
{
QCString depName = option->dependsOn();
if (!depName.isEmpty())
{
ConfigOption * dep = Config::instance()->get(depName);
if (dep->kind()==ConfigOption::O_Bool
&& Config_getBool(depName)==FALSE)
{
msg("disabling %s since its dependency(%s) is also disabled\n",option->name().data(),depName.data());
if (option->kind()==ConfigOption::O_Bool)
Config_getBool(option->name())=FALSE;
}
}
}
}

void Config::init()
Expand Down

0 comments on commit 5d64c0e

Please sign in to comment.