diff options
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 379ae16..866c132 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -631,7 +631,9 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( const char* iwyu = this->GeneratorTarget->GetProperty(iwyu_prop); std::string const tidy_prop = lang + "_CLANG_TIDY"; const char* tidy = this->GeneratorTarget->GetProperty(tidy_prop); - if ((iwyu && *iwyu) || (tidy && *tidy)) { + std::string const cpplint_prop = lang + "_CPPLINT"; + const char* cpplint = this->GeneratorTarget->GetProperty(cpplint_prop); + if ((iwyu && *iwyu) || (tidy && *tidy) || (cpplint && *cpplint)) { std::string run_iwyu = "$(CMAKE_COMMAND) -E __run_iwyu"; if (iwyu && *iwyu) { run_iwyu += " --iwyu="; @@ -640,6 +642,12 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile( if (tidy && *tidy) { run_iwyu += " --tidy="; run_iwyu += this->LocalGenerator->EscapeForShell(tidy); + } + if (cpplint && *cpplint) { + run_iwyu += " --cpplint="; + run_iwyu += this->LocalGenerator->EscapeForShell(cpplint); + } + if ((tidy && *tidy) || (cpplint && *cpplint)) { run_iwyu += " --source="; run_iwyu += sourceFile; } |