diff options
author | Martin Duffy <martin.duffy@kitware.com> | 2022-05-16 21:27:37 (GMT) |
---|---|---|
committer | Martin Duffy <martin.duffy@kitware.com> | 2022-05-18 14:30:30 (GMT) |
commit | 65f7053d6c5a0d256691e156a22cc0e9f31a4d5a (patch) | |
tree | a29446f47f180b036e0d72041ce78b6d47e23f0b /Source/cmake.cxx | |
parent | 76a08cd25332b74627802df8817068219b89161d (diff) | |
download | CMake-65f7053d6c5a0d256691e156a22cc0e9f31a4d5a.zip CMake-65f7053d6c5a0d256691e156a22cc0e9f31a4d5a.tar.gz CMake-65f7053d6c5a0d256691e156a22cc0e9f31a4d5a.tar.bz2 |
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 5bfc4c8..4997602 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; } } }; |