diff options
author | Brad King <brad.king@kitware.com> | 2016-05-16 18:44:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-05-16 20:04:43 (GMT) |
commit | c7006d2ef1c0e511ddccc7393cc2fd0d89a94b4c (patch) | |
tree | 9af6aa8a8ab0599d04510158de4dd996949d6f60 /Source | |
parent | d08281094948eaefb495040f4a7bb45cba17a5a7 (diff) | |
download | CMake-c7006d2ef1c0e511ddccc7393cc2fd0d89a94b4c.zip CMake-c7006d2ef1c0e511ddccc7393cc2fd0d89a94b4c.tar.gz CMake-c7006d2ef1c0e511ddccc7393cc2fd0d89a94b4c.tar.bz2 |
cmGeneratorTarget: Protect macro code layout from clang-format
The `IMPLEMENT_VISIT_IMPL` macro must preserve a space before the `>`
character in case the `DATATYPE` is a template type ending in `>`.
Manually format the macro layout as clang-format would except for this
space. Then add markup to tell clang-format not to format this macro.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 4ffe2f0..dffe4cc 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -559,18 +559,18 @@ static void handleSystemIncludesDep(cmLocalGenerator *lg, } } -#define IMPLEMENT_VISIT_IMPL(DATA, DATATYPE) \ - { \ - std::vector<cmSourceFile*> sourceFiles; \ - this->GetSourceFiles(sourceFiles, config); \ - TagVisitor< DATA##Tag DATATYPE > visitor(this, data); \ - for(std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \ - si != sourceFiles.end(); ++si) \ - { \ - visitor.Accept(*si); \ - } \ - } \ - +/* clang-format off */ +#define IMPLEMENT_VISIT_IMPL(DATA, DATATYPE) \ + { \ + std::vector<cmSourceFile*> sourceFiles; \ + this->GetSourceFiles(sourceFiles, config); \ + TagVisitor< DATA##Tag DATATYPE > visitor(this, data); \ + for (std::vector<cmSourceFile*>::const_iterator si = sourceFiles.begin(); \ + si != sourceFiles.end(); ++si) { \ + visitor.Accept(*si); \ + } \ + } +/* clang-format on */ #define IMPLEMENT_VISIT(DATA) \ IMPLEMENT_VISIT_IMPL(DATA, EMPTY) \ |