Chandler Carruth | 20e4129 | 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 | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 4 | # add_clang_unittest(test_dirname file1.cpp file2.cpp) |
Jeffrey Yasskin | f91ae52 | 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 | f96b9ce | 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 | 20e4129 | 2012-06-21 05:23:23 +0000 | [diff] [blame^] | 9 | add_unittest(ClangUnitTests ${test_dirname} ${ARGN}) |
Jeffrey Yasskin | 718b01d | 2011-02-15 07:54:28 +0000 | [diff] [blame] | 10 | endfunction() |
| 11 | |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 12 | add_clang_unittest(BasicTests |
Zhanyong Wan | c515d18 | 2011-02-16 05:45:20 +0000 | [diff] [blame] | 13 | Basic/FileManagerTest.cpp |
Argyrios Kyrtzidis | d7711ec | 2011-12-21 16:56:29 +0000 | [diff] [blame] | 14 | Basic/SourceManagerTest.cpp |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 15 | ) |
| 16 | target_link_libraries(BasicTests |
| 17 | clangLex |
| 18 | ) |
Zhanyong Wan | c515d18 | 2011-02-16 05:45:20 +0000 | [diff] [blame] | 19 | |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 20 | add_clang_unittest(LexTests |
Argyrios Kyrtzidis | 19d5aea | 2012-01-19 15:59:01 +0000 | [diff] [blame] | 21 | Lex/LexerTest.cpp |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 22 | ) |
| 23 | target_link_libraries(LexTests |
| 24 | clangLex |
| 25 | ) |
Argyrios Kyrtzidis | 19d5aea | 2012-01-19 15:59:01 +0000 | [diff] [blame] | 26 | |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 27 | add_clang_unittest(FrontendTests |
Jeffrey Yasskin | 718b01d | 2011-02-15 07:54:28 +0000 | [diff] [blame] | 28 | Frontend/FrontendActionTest.cpp |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 29 | ) |
| 30 | target_link_libraries(FrontendTests |
| 31 | clangFrontend |
| 32 | ) |
Manuel Klimek | cb971c6 | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 33 | |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 34 | add_clang_unittest(ToolingTests |
Manuel Klimek | cb971c6 | 2012-04-04 12:07:46 +0000 | [diff] [blame] | 35 | Tooling/CompilationDatabaseTest.cpp |
| 36 | Tooling/ToolingTest.cpp |
Manuel Klimek | fad7f85 | 2012-04-19 08:48:53 +0000 | [diff] [blame] | 37 | Tooling/RecursiveASTVisitorTest.cpp |
Manuel Klimek | f9d4cbd | 2012-05-23 16:29:20 +0000 | [diff] [blame] | 38 | Tooling/RefactoringTest.cpp |
Manuel Klimek | bfbfee5 | 2012-05-22 17:01:35 +0000 | [diff] [blame] | 39 | Tooling/RewriterTest.cpp |
Chandler Carruth | f96b9ce | 2012-06-21 02:04:39 +0000 | [diff] [blame] | 40 | ) |
| 41 | target_link_libraries(ToolingTests |
| 42 | clangAST |
| 43 | clangTooling |
| 44 | clangRewrite |
| 45 | ) |