add_custom_target(ClangUnitTests)
set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests")

# add_clang_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against the clang
# Produces a binary named 'basename(test_dirname)'.
function(add_clang_unittest test_dirname)
  add_unittest(ClangUnitTests ${test_dirname} ${ARGN})
endfunction()

add_subdirectory(Basic)
add_subdirectory(Lex)
add_subdirectory(Driver)
if(CLANG_ENABLE_STATIC_ANALYZER)
  add_subdirectory(Frontend)
endif()
if(CLANG_ENABLE_REWRITER)
  add_subdirectory(ASTMatchers)
  add_subdirectory(AST)
  add_subdirectory(Tooling)
  add_subdirectory(Format)
  add_subdirectory(Sema)
endif()
add_subdirectory(libclang)

add_custom_target(ClangUnitTests)
set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests")

# add_clang_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against the clang
# Produces a binary named 'basename(test_dirname)'.
function(add_clang_unittest test_dirname)
  add_unittest(ClangUnitTests ${test_dirname} ${ARGN})
endfunction()

add_subdirectory(Basic)
add_subdirectory(Lex)
add_subdirectory(Driver)
if(CLANG_ENABLE_STATIC_ANALYZER)
  add_subdirectory(Frontend)
endif()
if(CLANG_ENABLE_REWRITER)
  add_subdirectory(ASTMatchers)
  add_subdirectory(AST)
  add_subdirectory(Tooling)
  add_subdirectory(Format)
  add_subdirectory(Sema)
endif()
if(NOT WIN32) # FIXME:Investigating.
  add_subdirectory(libclang)
endif()

Disable libclangTests.exe on win32 for now.
[CMake] Disable libclangTests.exe on win32 for now.

libclangTests.exe cannot find libclang.dll since it is not on $PATH.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@201348 91177308-0d34-0410-b5e6-96231b3b80d8
