diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2022-11-29 18:39:10 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2022-12-06 15:39:29 (GMT) |
commit | 232467eb1c0dab9156cd8c4af56aad3959cbee4b (patch) | |
tree | 2772b01850c143598e642282966401cb976dd421 /Source/cmcmd.cxx | |
parent | 7ea665b74da322e96dd3e7f90075143c2957728c (diff) | |
download | CMake-232467eb1c0dab9156cd8c4af56aad3959cbee4b.zip CMake-232467eb1c0dab9156cd8c4af56aad3959cbee4b.tar.gz CMake-232467eb1c0dab9156cd8c4af56aad3959cbee4b.tar.bz2 |
clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Fixes: #21362
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 06bceb4..4303f96 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -367,6 +367,12 @@ int HandleTidy(const std::string& runCmd, const std::string& sourceFile, std::vector<std::string> tidy_cmd = cmExpandedList(runCmd, true); tidy_cmd.push_back(sourceFile); + for (auto const& arg : tidy_cmd) { + if (cmHasLiteralPrefix(arg, "--export-fixes=")) { + cmSystemTools::RemoveFile(arg.substr(cmStrLen("--export-fixes="))); + } + } + // clang-tidy supports working out the compile commands from a // compile_commands.json file in a directory given by a "-p" option, or by // passing the compiler command line arguments after --. When the latter |