set(LLVM_LINK_COMPONENTS Support Passes Core)

add_llvm_unittest(PluginsTests PluginsTest.cpp)
export_executable_symbols(PluginsTests)

add_library(TestPlugin MODULE TestPlugin.cxx)

set_output_directory(TestPlugin
  BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
  LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
  )

set_target_properties(TestPlugin
  PROPERTIES PREFIX ""
  SUFFIX ".so"
  )

add_dependencies(PluginsTests TestPlugin)

set(LLVM_LINK_COMPONENTS Support Passes Core)

add_llvm_unittest(PluginsTests PluginsTest.cpp)
export_executable_symbols(PluginsTests)

add_library(TestPlugin MODULE TestPlugin.cxx)

set_output_directory(TestPlugin
  BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
  LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
  )

set_target_properties(TestPlugin
  PROPERTIES PREFIX ""
  SUFFIX ".so"
  )

add_dependencies(TestPlugin intrinsics_gen)
add_dependencies(PluginsTests TestPlugin)

Fix r329293: Add a missing CMake dependency
Fix r329293:  Add a missing CMake dependency

The unittest plugin indirectly includes Attributes.gen, so make sure its
target depends on the appropriate tablegen target.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@329308 91177308-0d34-0410-b5e6-96231b3b80d8
