Debian Codegraph @

clang/lib/Format/CMakeLists.txt

raw
1 set(LLVM_LINK_COMPONENTS support)
2
3 add_clang_library(clangFormat
4 AffectedRangeManager.cpp
5 BreakableToken.cpp
6 ContinuationIndenter.cpp
7 DefinitionBlockSeparator.cpp
8 Format.cpp
9 FormatToken.cpp
10 FormatTokenLexer.cpp
11 IntegerLiteralSeparatorFixer.cpp
12 MacroCallReconstructor.cpp
13 MacroExpander.cpp
14 MatchFilePath.cpp
15 NamespaceEndCommentsFixer.cpp
16 ObjCPropertyAttributeOrderFixer.cpp
17 QualifierAlignmentFixer.cpp
18 SortJavaScriptImports.cpp
19 TokenAnalyzer.cpp
20 TokenAnnotator.cpp
21 UnwrappedLineFormatter.cpp
22 UnwrappedLineParser.cpp
23 UsingDeclarationsSorter.cpp
24 WhitespaceManager.cpp
25
26 LINK_LIBS
27 clangBasic
28 clangLex
29 clangToolingCore
30 clangToolingInclusions
31 )
32
33 file(GLOB_RECURSE files
34 *.cpp
35 *.h
36 ../../include/clang/Format/*.h
37 ../../tools/clang-format/*.cpp
38 ../../unittests/Format/*.cpp
39 ../../unittests/Format/*.h
40 )
41
42 set(check_format_depends)
43 set(i 0)
44 foreach (file IN LISTS files)
45 add_custom_command(OUTPUT clang-format-check-format${i}
46 COMMAND clang-format ${file} | diff -u ${file} -
47 VERBATIM
48 COMMENT "Checking format of ${file}..."
49 )
50 list(APPEND check_format_depends "clang-format-check-format${i}")
51
52 math(EXPR i ${i}+1)
53 endforeach ()
54
55 add_custom_target(clang-format-check-format DEPENDS ${check_format_depends})