summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2017-08-28 22:25:13 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2017-09-13 21:44:49 (GMT)
commit3bbe95f58a8fb83e56ca9023ef01b9e70b391b05 (patch)
tree786b5d6a10a78bff00f6daee00271bdfac3e570f /Source/cmMakefileTargetGenerator.cxx
parent3ea87bce69d1b6120b227fed3838f1bc9ab45db1 (diff)
downloadCMake-3bbe95f58a8fb83e56ca9023ef01b9e70b391b05.zip
CMake-3bbe95f58a8fb83e56ca9023ef01b9e70b391b05.tar.gz
CMake-3bbe95f58a8fb83e56ca9023ef01b9e70b391b05.tar.bz2
Clean up iwyu code to not be one big if statement.
This commit changes the internal -E__run_iwyu to be -E__run_co_compile. This is used for co-compile commands. These are tools that want to mirror the compiler. For each compiler invocation the tool will be invoked first. This started as a way to implement include what you use (iwyu), but has expanded to include cpplint, cppcheck and others. Likely there will be more in the future as well. This commit implements each one in its own function and provides a way to add additional ones in the future with less work.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index c1cf103..11f3e88 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -637,7 +637,7 @@ void cmMakefileTargetGenerator::WriteObjectBuildFile(
const char* cppcheck = this->GeneratorTarget->GetProperty(cppcheck_prop);
if ((iwyu && *iwyu) || (tidy && *tidy) || (cpplint && *cpplint) ||
(cppcheck && *cppcheck)) {
- std::string run_iwyu = "$(CMAKE_COMMAND) -E __run_iwyu";
+ std::string run_iwyu = "$(CMAKE_COMMAND) -E __run_co_compile";
if (iwyu && *iwyu) {
run_iwyu += " --iwyu=";
run_iwyu += this->LocalGenerator->EscapeForShell(iwyu);