Disable JIT/MCJIT tests in unittests/ExecutionEngine for the targets that don't suppo...
[oota-llvm.git] / unittests / ExecutionEngine / CMakeLists.txt
index ed7f10a23c8ade4e892736ee2781bf64a3fd6a88..4eefc1e3bb1b0ddcc758cd81311005a4893dde53 100644 (file)
@@ -6,5 +6,9 @@ add_llvm_unittest(ExecutionEngineTests
   ExecutionEngineTest.cpp
   )
 
-add_subdirectory(JIT)
-add_subdirectory(MCJIT)
+# 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()