diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-08 13:43:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2002-05-08 13:43:45 (GMT) |
commit | 6e472fdbb0798036828a603cb5ab3f4461ebfd4c (patch) | |
tree | dfdd7c0fb19dcbc8b5fc9ef0447c732c22092608 /Source/MFCDialog/CMakeCommandLineInfo.cpp | |
parent | 0caf44cb5d2f1e96391d8ed990fa9ae07fda563e (diff) | |
download | CMake-6e472fdbb0798036828a603cb5ab3f4461ebfd4c.zip CMake-6e472fdbb0798036828a603cb5ab3f4461ebfd4c.tar.gz CMake-6e472fdbb0798036828a603cb5ab3f4461ebfd4c.tar.bz2 |
ENH: take cmake style command line options so edit_cache works
Diffstat (limited to 'Source/MFCDialog/CMakeCommandLineInfo.cpp')
-rw-r--r-- | Source/MFCDialog/CMakeCommandLineInfo.cpp | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/Source/MFCDialog/CMakeCommandLineInfo.cpp b/Source/MFCDialog/CMakeCommandLineInfo.cpp index 26c705b..8ef3c43 100644 --- a/Source/MFCDialog/CMakeCommandLineInfo.cpp +++ b/Source/MFCDialog/CMakeCommandLineInfo.cpp @@ -54,33 +54,38 @@ void CMakeCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast) { CString sParam(lpszParam); // Single letter valued flag like /B=value or /B:value + CString value; if (sParam[1] == '=' || sParam[1] == ':') { - CString value(sParam.Right(sParam.GetLength() - 2)); - int res; - switch (sParam[0]) - { - case 'A': - res = CMakeCommandLineInfo::GetBoolValue(value); - if (res == 1) - { - m_AdvancedValues = TRUE; - } - else if (res == -1) - { - m_AdvancedValues = FALSE; - } - break; - case 'B': - m_WhereBuild = value; - break; - case 'G': - m_GeneratorChoiceString = value; - break; - case 'H': - m_WhereSource = value; - break; - } + value = sParam.Right(sParam.GetLength() - 2); + } + else + { + value = sParam.Right(sParam.GetLength()-1); + } + int res; + switch (sParam[0]) + { + case 'A': + res = CMakeCommandLineInfo::GetBoolValue(value); + if (res == 1) + { + m_AdvancedValues = TRUE; + } + else if (res == -1) + { + m_AdvancedValues = FALSE; + } + break; + case 'B': + m_WhereBuild = value; + break; + case 'G': + m_GeneratorChoiceString = value; + break; + case 'H': + m_WhereSource = value; + break; } } |