summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-08 02:45:56 +0000
committerAlp Toker <alp@nuanti.com>2014-06-08 02:45:56 +0000
commit11e082eb543a9d7c92892a3833e8679000858370 (patch)
tree011ffa65b52e1bfcaacdb3b218466ffc7be40825 /unittests
parentb8ff7273c67bfd7233426285933054a689f1c0fb (diff)
downloadllvm-11e082eb543a9d7c92892a3833e8679000858370.tar.gz
llvm-11e082eb543a9d7c92892a3833e8679000858370.tar.bz2
llvm-11e082eb543a9d7c92892a3833e8679000858370.tar.xz
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: https://llvm.org/svn/llvm-project/llvm/trunk@210411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/ExecutionEngine/CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/unittests/ExecutionEngine/CMakeLists.txt b/unittests/ExecutionEngine/CMakeLists.txt
index 7ef509b324..489eaaff6a 100644
--- a/unittests/ExecutionEngine/CMakeLists.txt
+++ b/unittests/ExecutionEngine/CMakeLists.txt
@@ -9,9 +9,10 @@ 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 )
+# 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()