add_clang_library(clangIncludeFixerPlugin
  IncludeFixerPlugin.cpp

  LINK_LIBS
  clangAST
  clangBasic
  clangFrontend
  clangIncludeFixer
  clangParse
  clangSema
  clangTooling
  ${PTHREAD_LIB}
  )

add_clang_library(clangIncludeFixerPlugin
  IncludeFixerPlugin.cpp

  LINK_LIBS
  clangAST
  clangBasic
  clangFrontend
  clangIncludeFixer
  clangParse
  clangSema
  clangTooling
  ${LLVM_PTHREAD_LIB}
  )

Fix pthread handling for out-of-tree builds
[CMake] Fix pthread handling for out-of-tree builds

LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects
to correctly link the threading library when needed. Unfortunately
`PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed
and therefore can't be used when configuring out-of-tree builds. This causes
such builds to fail since `pthread` isn't being correctly linked.

This patch attempts to fix that problem by renaming and exporting
`LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB`
because It seemed likely to cause collisions with downstream users of
`LLVMConfig.cmake`.


git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@294690 91177308-0d34-0410-b5e6-96231b3b80d8
