diff options
author | Wil Stark <wil_stark@keysight.com> | 2019-02-05 15:12:38 -0800 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-02-07 06:39:45 -0500 |
commit | 822697996e3c3fb92eaa817584d0bf6e0bd76b22 (patch) | |
tree | e1689d83e5c97afb907cc12c820d1dd01b7a1761 /Source/cmIDEOptions.h | |
parent | 6f23321d405930241fa431cfda7650f2993f0c19 (diff) | |
download | cmake-822697996e3c3fb92eaa817584d0bf6e0bd76b22.tar.gz |
VS: Fix nowarn compiler option to accept warning numbers.
Warning disables are transferred to the VS IDE `<NoWarn>` node.
Fixes: #18878
Diffstat (limited to 'Source/cmIDEOptions.h')
-rw-r--r-- | Source/cmIDEOptions.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h index a4e5757808..4a430732fd 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; |