summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-17 16:33:24 (GMT)
committerBrad King <brad.king@kitware.com>2016-11-18 14:43:19 (GMT)
commit44de61578130cbd6e0f23057f9cf86f884078a4e (patch)
tree2bfd7be17fbe980eaf1b83e0d2e5ddb0203afc22 /Source
parent0e9634d2c90fd748774f9238219cb1661550f233 (diff)
downloadCMake-44de61578130cbd6e0f23057f9cf86f884078a4e.zip
CMake-44de61578130cbd6e0f23057f9cf86f884078a4e.tar.gz
CMake-44de61578130cbd6e0f23057f9cf86f884078a4e.tar.bz2
cmake: Comment why we ignore the include-what-you-use return code
The include-what-you-use tool always returns non-zero to indicate that it did not actually produce an object file as Clang would from the same command line. Add a comment explaining that this is why we ignore its return code. Also update our `pseudo_iwyu` test suite tool to always exit with an error too.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmcmd.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 1db147a..945913e 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -327,6 +327,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
iwyu_cmd.insert(iwyu_cmd.end(), orig_cmd.begin() + 1, orig_cmd.end());
// Run the iwyu command line. Capture its stderr and hide its stdout.
+ // Ignore its return code because the tool always returns non-zero.
std::string stdErr;
if (!cmSystemTools::RunSingleCommand(iwyu_cmd, CM_NULLPTR, &stdErr,
&ret, CM_NULLPTR,