set(LLVM_LINK_COMPONENTS Support Passes Core)

# FIXME Temorarily disable this on windows
if (LLVM_ENABLE_PLUGINS AND NOT WIN32 AND NOT CYGWIN)
  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"
    )

  if (WIN32 OR CYGWIN)
    llvm_map_components_to_libnames(LLVM_DEPS ${LLVM_LINK_COMPONENTS})
    target_link_libraries(TestPlugin ${LLVM_DEPS})
  endif()

  add_dependencies(TestPlugin intrinsics_gen)
  add_dependencies(PluginsTests TestPlugin)
endif()

set(LLVM_LINK_COMPONENTS Support Passes Core)

if (LLVM_ENABLE_PLUGINS)
  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"
    )

  if (WIN32 OR CYGWIN)
    llvm_map_components_to_libnames(LLVM_DEPS ${LLVM_LINK_COMPONENTS})
    target_link_libraries(TestPlugin ${LLVM_DEPS})
  endif()

  add_dependencies(TestPlugin intrinsics_gen)
  add_dependencies(PluginsTests TestPlugin)
endif()

Revert "Followup for r329293: Temporarily disable the breaking test on windows."
Revert "Followup for r329293: Temporarily disable the breaking test on windows."

This reverts commit r329393 / b52ba35e7759cd4002221be1dbb63ec80fde21ec.

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