Chandler Carruth | f0dcac6 | 2012-06-21 05:23:23 +0000 | [diff] [blame^] | 1 | add_custom_target(ClangUnitTests) |
| 2 | set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests") |
| 3 | |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 4 | # add_clang_unittest(test_dirname file1.cpp file2.cpp) |
Jeffrey Yasskin | 39a5820 | 2011-02-19 18:06:01 +0000 | [diff] [blame] | 5 | # |
| 6 | # Will compile the list of files together and link against the clang |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 7 | # Produces a binary named 'basename(test_dirname)'. |
| 8 | function(add_clang_unittest test_dirname) |
Chandler Carruth | f0dcac6 | 2012-06-21 05:23:23 +0000 | [diff] [blame^] | 9 | add_unittest(ClangUnitTests ${test_dirname} ${ARGN}) |
Jeffrey Yasskin | cd3858b | 2011-02-15 07:54:28 +0000 | [diff] [blame] | 10 | endfunction() |
| 11 | |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 12 | add_clang_unittest(BasicTests |
Zhanyong Wan | 5201b66 | 2011-02-16 05:45:20 +0000 | [diff] [blame] | 13 | Basic/FileManagerTest.cpp |
Argyrios Kyrtzidis | 2403797 | 2011-12-21 16:56:29 +0000 | [diff] [blame] | 14 | Basic/SourceManagerTest.cpp |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 15 | ) |
| 16 | target_link_libraries(BasicTests |
| 17 | clangLex |
| 18 | ) |
Zhanyong Wan | 5201b66 | 2011-02-16 05:45:20 +0000 | [diff] [blame] | 19 | |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 20 | add_clang_unittest(LexTests |
Argyrios Kyrtzidis | d169911 | 2012-01-19 15:59:01 +0000 | [diff] [blame] | 21 | Lex/LexerTest.cpp |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 22 | ) |
| 23 | target_link_libraries(LexTests |
| 24 | clangLex |
| 25 | ) |
Argyrios Kyrtzidis | d169911 | 2012-01-19 15:59:01 +0000 | [diff] [blame] | 26 | |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 27 | add_clang_unittest(FrontendTests |
Jeffrey Yasskin | cd3858b | 2011-02-15 07:54:28 +0000 | [diff] [blame] | 28 | Frontend/FrontendActionTest.cpp |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 29 | ) |
| 30 | target_link_libraries(FrontendTests |
| 31 | clangFrontend |
| 32 | ) |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 33 | |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 34 | add_clang_unittest(ToolingTests |
Manuel Klimek | 47c245a | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 35 | Tooling/CompilationDatabaseTest.cpp |
| 36 | Tooling/ToolingTest.cpp |
Manuel Klimek | 770691b | 2012-04-19 08:48:53 +0000 | [diff] [blame] | 37 | Tooling/RecursiveASTVisitorTest.cpp |
Manuel Klimek | 3f00134 | 2012-05-23 16:29:20 +0000 | [diff] [blame] | 38 | Tooling/RefactoringTest.cpp |
Manuel Klimek | 78d084d | 2012-05-22 17:01:35 +0000 | [diff] [blame] | 39 | Tooling/RewriterTest.cpp |
Chandler Carruth | 8897331 | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 40 | ) |
| 41 | target_link_libraries(ToolingTests |
| 42 | clangAST |
| 43 | clangTooling |
| 44 | clangRewrite |
| 45 | ) |