diff options
| author | Martin Duffy <martin.duffy@kitware.com> | 2022-05-16 17:27:37 -0400 |
|---|---|---|
| committer | Martin Duffy <martin.duffy@kitware.com> | 2022-05-18 10:30:30 -0400 |
| commit | 65f7053d6c5a0d256691e156a22cc0e9f31a4d5a (patch) | |
| tree | a29446f47f180b036e0d72041ce78b6d47e23f0b /Source/cmake.cxx | |
| parent | 76a08cd25332b74627802df8817068219b89161d (diff) | |
| download | cmake-65f7053d6c5a0d256691e156a22cc0e9f31a4d5a.tar.gz | |
COMPILE_WARNING_AS_ERROR: Add command-line option
Add command-line option `--compile-no-warning-as-error` to ignore value of
`COMPILE_WARNING_AS_ERROR`.
Issue: #19085
Diffstat (limited to 'Source/cmake.cxx')
| -rw-r--r-- | Source/cmake.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 5bfc4c8b0e..4997602df5 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1092,6 +1092,14 @@ void cmake::SetArgs(const std::vector<std::string>& args) << "uninitialized variables.\n"; state->SetCheckSystemVars(true); return true; + } }, + CommandArgument{ + "--compile-no-warning-as-error", CommandArgument::Values::Zero, + [](std::string const&, cmake* state) -> bool { + std::cout << "Ignoring COMPILE_WARNING_AS_ERROR target property and " + << "CMAKE_COMPILE_WARNING_AS_ERROR variable.\n"; + state->SetIgnoreWarningAsError(true); + return true; } } }; |
