summaryrefslogtreecommitdiffstats
path: root/src/config.l
diff options
context:
space:
mode:
authorAdrian Negreanu <adrian.m.negreanu@intel.com>2014-03-06 20:22:31 (GMT)
committerAdrian Negreanu <adrian.m.negreanu@intel.com>2014-03-06 20:25:12 (GMT)
commit5d64c0e2f39730bb5decd86a483a5b0823a67958 (patch)
tree1832a1c4d4bc139bf067376bdde4ba3d66a6b07a /src/config.l
parent8eeaae0b06fd320745f22efe176e0f19d6c8e2a6 (diff)
downloadDoxygen-5d64c0e2f39730bb5decd86a483a5b0823a67958.zip
Doxygen-5d64c0e2f39730bb5decd86a483a5b0823a67958.tar.gz
Doxygen-5d64c0e2f39730bb5decd86a483a5b0823a67958.tar.bz2
config.l: dependency checks for booleans
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>
Diffstat (limited to 'src/config.l')
-rw-r--r--src/config.l19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/config.l b/src/config.l
index 377d6e4..5d51acb 100644
--- a/src/config.l
+++ b/src/config.l
@@ -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()