summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-07 11:41:22 (GMT)
committerBrad King <brad.king@kitware.com>2019-02-07 11:41:22 (GMT)
commitf835526d8f4f719e7d1d28232b146bc26c17b8c9 (patch)
treeae93c4fef47691df49f89f39355c4ede26b13e32 /Source
parentbf1c2a2593e28c4e754420df6984f7f0f183e930 (diff)
parent822697996e3c3fb92eaa817584d0bf6e0bd76b22 (diff)
downloadCMake-f835526d8f4f719e7d1d28232b146bc26c17b8c9.zip
CMake-f835526d8f4f719e7d1d28232b146bc26c17b8c9.tar.gz
CMake-f835526d8f4f719e7d1d28232b146bc26c17b8c9.tar.bz2
Merge branch 'vs-csharp-nowarn-numbers' into release-3.14
Merge-request: !2923
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx2
-rw-r--r--Source/cmIDEFlagTable.h3
-rw-r--r--Source/cmIDEOptions.cxx2
-rw-r--r--Source/cmIDEOptions.h12
4 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 07656ed..d8b2e89 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -1136,6 +1136,8 @@ static unsigned int cmLoadFlagTableSpecial(Json::Value entry,
value |= cmIDEFlagTable::CaseInsensitive;
} else if (s == "SpaceAppendable") {
value |= cmIDEFlagTable::SpaceAppendable;
+ } else if (s == "CommaAppendable") {
+ value |= cmIDEFlagTable::CommaAppendable;
}
}
}
diff --git a/Source/cmIDEFlagTable.h b/Source/cmIDEFlagTable.h
index 28d5d53..ff93432 100644
--- a/Source/cmIDEFlagTable.h
+++ b/Source/cmIDEFlagTable.h
@@ -29,6 +29,9 @@ struct cmIDEFlagTable
SpaceAppendable = (1 << 7), // a flag that if specified multiple times
// should have its value appended to the
// old value with spaces
+ CommaAppendable = (1 << 8), // a flag that if specified multiple times
+ // should have its value appended to the
+ // old value with commas (e.g. C# /nowarn
UserValueIgnored = UserValue | UserIgnored,
UserValueRequired = UserValue | UserRequired
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index ee0c782..ea67d45 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -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;
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index a4e5757..4a43073 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -65,12 +65,22 @@ protected:
this->derived::operator=(r);
return *this;
}
+ FlagValue& append_with_comma(std::string const& r)
+ {
+ return append_with_separator(r, ',');
+ }
FlagValue& append_with_space(std::string const& r)
{
+ return append_with_separator(r, ' ');
+ }
+
+ private:
+ FlagValue& append_with_separator(std::string const& r, char separator)
+ {
this->resize(1);
std::string& l = this->operator[](0);
if (!l.empty()) {
- l += " ";
+ l += separator;
}
l += r;
return *this;