diff options
author | Andrew Fuller <afuller@teradici.com> | 2020-11-04 20:46:51 -0800 |
---|---|---|
committer | Andrew Fuller <afuller@teradici.com> | 2020-11-05 11:39:32 -0800 |
commit | 1134064e22828605ce1ea387b8f96e38e5705463 (patch) | |
tree | 0b9caf582aca776f95814fc2f4a2b79dc74752cb /Source/cmMakefileTargetGenerator.cxx | |
parent | da0a7d28a4560c3e135936c91d97b104c01616ad (diff) | |
download | cmake-1134064e22828605ce1ea387b8f96e38e5705463.tar.gz |
clang-tidy: allow OBJC and OBJCXX
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index b1600649d7..370608f090 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -873,15 +873,21 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( } // Maybe insert an include-what-you-use runner. - if (!compileCommands.empty() && (lang == "C" || lang == "CXX")) { - std::string const iwyu_prop = lang + "_INCLUDE_WHAT_YOU_USE"; - cmProp iwyu = this->GeneratorTarget->GetProperty(iwyu_prop); + if (!compileCommands.empty() && + (lang == "C" || lang == "CXX" || lang == "OBJC" || lang == "OBJCXX")) { std::string const tidy_prop = lang + "_CLANG_TIDY"; cmProp tidy = this->GeneratorTarget->GetProperty(tidy_prop); - std::string const cpplint_prop = lang + "_CPPLINT"; - cmProp cpplint = this->GeneratorTarget->GetProperty(cpplint_prop); - std::string const cppcheck_prop = lang + "_CPPCHECK"; - cmProp cppcheck = this->GeneratorTarget->GetProperty(cppcheck_prop); + cmProp iwyu = nullptr; + cmProp cpplint = nullptr; + cmProp cppcheck = nullptr; + if (lang == "C" || lang == "CXX") { + std::string const iwyu_prop = lang + "_INCLUDE_WHAT_YOU_USE"; + iwyu = this->GeneratorTarget->GetProperty(iwyu_prop); + std::string const cpplint_prop = lang + "_CPPLINT"; + cpplint = this->GeneratorTarget->GetProperty(cpplint_prop); + std::string const cppcheck_prop = lang + "_CPPCHECK"; + cppcheck = this->GeneratorTarget->GetProperty(cppcheck_prop); + } if (cmNonempty(iwyu) || cmNonempty(tidy) || cmNonempty(cpplint) || cmNonempty(cppcheck)) { std::string run_iwyu = "$(CMAKE_COMMAND) -E __run_co_compile"; |