unittests/CMakeLists.txt: [PR8225] Tweak linking JITTests on MSVC to add JITTests.def.
CMake can pass *.def to link.exe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119783 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
index 1e8f25a..fda1875 100644
--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -63,13 +63,19 @@
ExecutionEngine/ExecutionEngineTest.cpp
)
-add_llvm_unittest(JIT
+set(JITTestsSources
ExecutionEngine/JIT/JITEventListenerTest.cpp
ExecutionEngine/JIT/JITMemoryManagerTest.cpp
ExecutionEngine/JIT/JITTest.cpp
ExecutionEngine/JIT/MultiJITTest.cpp
)
+if(MSVC)
+ list(APPEND JITTestsSources ExecutionEngine/JIT/JITTests.def)
+endif()
+
+add_llvm_unittest(JIT ${JITTestsSources})
+
add_llvm_unittest(Transforms
Transforms/Utils/Cloning.cpp
)