summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx25
1 files changed, 8 insertions, 17 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2ec893f..ea1d8ca 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -642,6 +642,8 @@ void cmake::SetArgs(const std::vector<std::string>& args)
path = cmSystemTools::CollapseFullPath(path);
cmSystemTools::ConvertToUnixSlashes(path);
this->SetHomeDirectory(path);
+ // XXX(clang-tidy): https://bugs.llvm.org/show_bug.cgi?id=44165
+ // NOLINTNEXTLINE(bugprone-branch-clone)
} else if (cmHasLiteralPrefix(arg, "-O")) {
// There is no local generate anymore. Ignore -O option.
} else if (cmHasLiteralPrefix(arg, "-B")) {
@@ -681,27 +683,16 @@ void cmake::SetArgs(const std::vector<std::string>& args)
this->VSSolutionFile = args[++i];
}
#endif
- else if (cmHasLiteralPrefix(arg, "-D")) {
+ else if (cmHasLiteralPrefix(arg, "-D") || cmHasLiteralPrefix(arg, "-U") ||
+ cmHasLiteralPrefix(arg, "-C")) {
// skip for now
- // in case '-D var=val' is given, also skip the next
- // in case '-Dvar=val' is given, don't skip the next
- if (arg.size() == 2) {
- ++i;
- }
- } else if (cmHasLiteralPrefix(arg, "-U")) {
- // skip for now
- // in case '-U var' is given, also skip the next
- // in case '-Uvar' is given, don't skip the next
- if (arg.size() == 2) {
- ++i;
- }
- } else if (cmHasLiteralPrefix(arg, "-C")) {
- // skip for now
- // in case '-C path' is given, also skip the next
- // in case '-Cpath' is given, don't skip the next
+ // in case '-[DUC] argval' var' is given, also skip the next
+ // in case '-[DUC]argval' is given, don't skip the next
if (arg.size() == 2) {
++i;
}
+ // XXX(clang-tidy): https://bugs.llvm.org/show_bug.cgi?id=44165
+ // NOLINTNEXTLINE(bugprone-branch-clone)
} else if (cmHasLiteralPrefix(arg, "-P")) {
// skip for now
i++;