@@ -702,8 +702,9 @@ bool ConfigGenerator::passCurrentValues()
702702 if (getConfigList (" LIBRARY_LIST" , libList, false )) {
703703 vector<string> list2;
704704 for (const auto & i : libList) {
705- const bool enable = !!isConfigOptionEnabled (i);
706- const bool weak = !enable;
705+ const auto opt = getConfigOption (i);
706+ const bool enable = (opt != m_configValues.end ()) && (opt->m_value != " 0" );
707+ const bool weak = enable;
707708 string optionUpper = i; // Ensure it is in upper case
708709 transform (optionUpper.begin (), optionUpper.end (), optionUpper.begin (), ::toupper);
709710 list2.resize (0 );
@@ -1660,15 +1661,15 @@ bool ConfigGenerator::toggleConfigValue(const string& option, const bool enable,
16601661 if (!i.m_lock ) {
16611662 // Lock the item to prevent cyclic conditions
16621663 i.m_lock = true ;
1664+ // Need to convert the name to lower case
1665+ string optionLower = option;
1666+ transform (optionLower.begin (), optionLower.end (), optionLower.begin (), ::tolower);
16631667 if (enable) {
1664- // Need to convert the name to lower case
1665- string optionLower = option;
1666- transform (optionLower.begin (), optionLower.end (), optionLower.begin (), ::tolower);
16671668 string checkFunc = optionLower + " _select" ;
16681669 vector<string> checkList;
16691670 if (getConfigList (checkFunc, checkList, false )) {
16701671 for (const auto & j : checkList) {
1671- toggleConfigValue (j, true , false , true );
1672+ toggleConfigValue (j, true , weak , true );
16721673 }
16731674 }
16741675
@@ -1688,9 +1689,6 @@ bool ConfigGenerator::toggleConfigValue(const string& option, const bool enable,
16881689 toggleConfigValue (j, true , weak, true );
16891690 }
16901691 } else if (!enable) {
1691- // Need to convert the name to lower case
1692- string optionLower = option;
1693- transform (optionLower.begin (), optionLower.end (), optionLower.begin (), ::tolower);
16941692 // Check for any hard dependencies that must be disabled
16951693 vector<string> forceDisable;
16961694 buildForcedDisables (optionLower, forceDisable);
0 commit comments