summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2022-11-29 18:39:10 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2022-12-06 15:39:29 (GMT)
commit232467eb1c0dab9156cd8c4af56aad3959cbee4b (patch)
tree2772b01850c143598e642282966401cb976dd421 /Source/cmGeneratorTarget.cxx
parent7ea665b74da322e96dd3e7f90075143c2957728c (diff)
downloadCMake-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/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index c80cdb9..123b5e6 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3726,6 +3726,24 @@ std::string cmGeneratorTarget::GetCreateRuleVariable(
return "";
}
+//----------------------------------------------------------------------------
+std::string cmGeneratorTarget::GetClangTidyExportFixesDirectory(
+ const std::string& lang) const
+{
+ cmValue val =
+ this->GetProperty(cmStrCat(lang, "_CLANG_TIDY_EXPORT_FIXES_DIR"));
+ if (!cmNonempty(val)) {
+ return {};
+ }
+
+ std::string path = *val;
+ if (!cmSystemTools::FileIsFullPath(path)) {
+ path =
+ cmStrCat(this->LocalGenerator->GetCurrentBinaryDirectory(), '/', path);
+ }
+ return cmSystemTools::CollapseFullPath(path);
+}
+
namespace {
void processIncludeDirectories(cmGeneratorTarget const* tgt,
EvaluatedTargetPropertyEntries& entries,