set(LLVM_LINK_COMPONENTS
  Core
  ExecutionEngine
  Interpreter
  Support
  )

add_llvm_unittest(ExecutionEngineTests
  ExecutionEngineTest.cpp
  )

# Include JIT/MCJIT tests only if native arch is a JIT target.
list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" have_jit)
if (NOT have_jit EQUAL -1 )
  add_subdirectory(JIT)
  add_subdirectory(MCJIT)
endif()

set(LLVM_LINK_COMPONENTS
  Core
  ExecutionEngine
  Interpreter
  Support
  )

add_llvm_unittest(ExecutionEngineTests
  ExecutionEngineTest.cpp
  )

# Include JIT/MCJIT tests only if native arch is a built JIT target.
list(FIND LLVM_TARGETS_TO_BUILD "${LLVM_NATIVE_ARCH}" build_idx)
list(FIND LLVM_TARGETS_WITH_JIT "${LLVM_NATIVE_ARCH}" jit_idx)
if (NOT build_idx LESS 0 AND NOT jit_idx LESS 0)
  add_subdirectory(JIT)
  add_subdirectory(MCJIT)
endif()

Fix build when no native target is enabled
Fix build when no native target is enabled

The JITTests and MCJITTests unit test targets require a native arch with JIT
support, otherwise fail to link.

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