From 0c750ec837f7ae06f0a64d3da56d7578d923b3cf Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 21 Jun 2012 09:51:42 +0000 Subject: 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 --- unittests/CMakeLists.txt | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) (limited to 'unittests/CMakeLists.txt') 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) -- cgit v1.2.3