summaryrefslogtreecommitdiff
path: root/unittests/CMakeLists.txt
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-06-21 09:51:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-06-21 09:51:42 +0000
commit0c750ec837f7ae06f0a64d3da56d7578d923b3cf (patch)
tree2ccfaec4c376300a4d16bfcdbb1d9db2f4dd3501 /unittests/CMakeLists.txt
parent1071ba9c324d831b437870a1fe63bf2ecdc4e9e4 (diff)
downloadclang-0c750ec837f7ae06f0a64d3da56d7578d923b3cf.tar.gz
clang-0c750ec837f7ae06f0a64d3da56d7578d923b3cf.tar.bz2
clang-0c750ec837f7ae06f0a64d3da56d7578d923b3cf.tar.xz
Clang side of a refactoring of the CMake unit test build strategy.
The fundamental change is to put a CMakeLists.txt file in the unittest directory, with a single test binary produced from it. This has several advantages. Among other fundamental advantages, we start to get the checking logic for when a file is missing from the CMake build, and this caught one missing file already! More fun details in the LLVM commit corresponding to this one. Note that the LLVM commit and this one most both be applied, or neither. Sorry for any skew issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/CMakeLists.txt')
-rw-r--r--unittests/CMakeLists.txt38
1 files changed, 4 insertions, 34 deletions
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
index cccca6e261..3dd927d9b9 100644
--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -9,37 +9,7 @@ function(add_clang_unittest test_dirname)
add_unittest(ClangUnitTests ${test_dirname} ${ARGN})
endfunction()
-add_clang_unittest(BasicTests
- Basic/FileManagerTest.cpp
- Basic/SourceManagerTest.cpp
- )
-target_link_libraries(BasicTests
- clangLex
- )
-
-add_clang_unittest(LexTests
- Lex/LexerTest.cpp
- )
-target_link_libraries(LexTests
- clangLex
- )
-
-add_clang_unittest(FrontendTests
- Frontend/FrontendActionTest.cpp
- )
-target_link_libraries(FrontendTests
- clangFrontend
- )
-
-add_clang_unittest(ToolingTests
- Tooling/CompilationDatabaseTest.cpp
- Tooling/ToolingTest.cpp
- Tooling/RecursiveASTVisitorTest.cpp
- Tooling/RefactoringTest.cpp
- Tooling/RewriterTest.cpp
- )
-target_link_libraries(ToolingTests
- clangAST
- clangTooling
- clangRewrite
- )
+add_subdirectory(Basic)
+add_subdirectory(Lex)
+add_subdirectory(Frontend)
+add_subdirectory(Tooling)