summaryrefslogtreecommitdiff
path: root/Source/cmIDEOptions.cxx
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:45 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:13:45 +0900
commitfa10a4a91520c9add2283a053dd755a7e5db9f4b (patch)
treeb4c33311cdf36a37e72e3c4bd013e59b42a815f6 /Source/cmIDEOptions.cxx
parent4ca455f44f42bf3257fe1ce752ca7447e9568a27 (diff)
downloadcmake-fa10a4a91520c9add2283a053dd755a7e5db9f4b.tar.gz
cmake-fa10a4a91520c9add2283a053dd755a7e5db9f4b.tar.bz2
cmake-fa10a4a91520c9add2283a053dd755a7e5db9f4b.zip
Imported Upstream version 3.14.1upstream/3.14.1
Diffstat (limited to 'Source/cmIDEOptions.cxx')
-rw-r--r--Source/cmIDEOptions.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index f996788d7..ea67d45fa 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -97,24 +97,24 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table,
{
const char* pf = flag.c_str() + 1;
// Look for an entry in the flag table matching this flag.
- for (cmIDEFlagTable const* entry = table; entry->IDEName; ++entry) {
+ for (cmIDEFlagTable const* entry = table; !entry->IDEName.empty(); ++entry) {
bool entry_found = false;
if (entry->special & cmIDEFlagTable::UserValue) {
// This flag table entry accepts a user-specified value. If
// the entry specifies UserRequired we must match only if a
// non-empty value is given.
- int n = static_cast<int>(strlen(entry->commandFlag));
- if ((strncmp(pf, entry->commandFlag, n) == 0 ||
+ int n = static_cast<int>(entry->commandFlag.length());
+ if ((strncmp(pf, entry->commandFlag.c_str(), n) == 0 ||
(entry->special & cmIDEFlagTable::CaseInsensitive &&
- cmsysString_strncasecmp(pf, entry->commandFlag, n))) &&
+ cmsysString_strncasecmp(pf, entry->commandFlag.c_str(), n))) &&
(!(entry->special & cmIDEFlagTable::UserRequired) ||
static_cast<int>(strlen(pf)) > n)) {
this->FlagMapUpdate(entry, std::string(pf + n));
entry_found = true;
}
- } else if (strcmp(pf, entry->commandFlag) == 0 ||
+ } else if (strcmp(pf, entry->commandFlag.c_str()) == 0 ||
(entry->special & cmIDEFlagTable::CaseInsensitive &&
- cmsysString_strcasecmp(pf, entry->commandFlag) == 0)) {
+ cmsysString_strcasecmp(pf, entry->commandFlag.c_str()) == 0)) {
if (entry->special & cmIDEFlagTable::UserFollowing) {
// This flag expects a value in the following argument.
this->DoingFollowing = entry;
@@ -148,6 +148,8 @@ void cmIDEOptions::FlagMapUpdate(cmIDEFlagTable const* entry,
this->FlagMap[entry->IDEName].push_back(new_value);
} else if (entry->special & cmIDEFlagTable::SpaceAppendable) {
this->FlagMap[entry->IDEName].append_with_space(new_value);
+ } else if (entry->special & cmIDEFlagTable::CommaAppendable) {
+ this->FlagMap[entry->IDEName].append_with_comma(new_value);
} else {
// Use the user-specified value.
this->FlagMap[entry->IDEName] = new_value;