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 | 0c750ec | 2012-06-21 09:51:42 +0000 | [diff] [blame] | 12 | add_subdirectory(Basic) |
| 13 | add_subdirectory(Lex) |
Roman Divacky | ff62d64 | 2013-05-29 21:09:18 +0000 | [diff] [blame] | 14 | if(CLANG_ENABLE_STATIC_ANALYZER) |
| 15 | add_subdirectory(Frontend) |
| 16 | endif() |
| 17 | if(CLANG_ENABLE_REWRITER) |
| 18 | add_subdirectory(ASTMatchers) |
| 19 | add_subdirectory(AST) |
| 20 | add_subdirectory(Tooling) |
| 21 | add_subdirectory(Format) |
Kaelyn Uhrain | 70571f4 | 2013-08-12 19:54:38 +0000 | [diff] [blame] | 22 | add_subdirectory(Sema) |
Roman Divacky | ff62d64 | 2013-05-29 21:09:18 +0000 | [diff] [blame] | 23 | endif() |