diff options
author | Brad King <brad.king@kitware.com> | 2022-12-07 13:19:44 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-12-07 08:19:53 -0500 |
commit | 3b4337adc79c3744ad7b78b05035b4b460fb5f48 (patch) | |
tree | 9057f7ab5b14df7f35589661016810a12c9dcdc3 /Source/cmGeneratorTarget.cxx | |
parent | 6bae244ad2a25a95a90dde1aa9047924b5acc530 (diff) | |
parent | 232467eb1c0dab9156cd8c4af56aad3959cbee4b (diff) | |
download | cmake-3b4337adc79c3744ad7b78b05035b4b460fb5f48.tar.gz |
Merge topic 'clang-tidy-export-fixes-dir'
232467eb1c clang-tidy: add <LANG>_CLANG_TIDY_EXPORT_FIXES_DIR property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7982
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 25711593b7..7ecdd8781a 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, |