Debian Codegraph @

clang/unittests/Interpreter/CMakeLists.txt

raw
1 set(LLVM_LINK_COMPONENTS
2 ${LLVM_TARGETS_TO_BUILD}
3 Core
4 MC
5 OrcJIT
6 Support
7 TargetParser
8 )
9
10 add_clang_unittest(ClangReplInterpreterTests
11 IncrementalCompilerBuilderTest.cpp
12 IncrementalProcessingTest.cpp
13 InterpreterTest.cpp
14 InterpreterExtensionsTest.cpp
15 CodeCompletionTest.cpp
16 )
17 target_link_libraries(ClangReplInterpreterTests PUBLIC
18 clangAST
19 clangBasic
20 clangInterpreter
21 clangFrontend
22 clangSema
23 LLVMTestingSupport
24 )
25
26 # Exceptions on Windows are not yet supported.
27 if(NOT WIN32)
28 add_subdirectory(ExceptionTests)
29 endif()
30
31 export_executable_symbols(ClangReplInterpreterTests)
32
33 if(MSVC)
34 set_target_properties(ClangReplInterpreterTests PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 1)
35
36 # RTTI/C++ symbols
37 set(ClangReplInterpreterTests_exports ${ClangReplInterpreterTests_exports} ??_7type_info@@6B@
38 ?__type_info_root_node@@3U__type_info_node@@A
39 ?nothrow@std@@3Unothrow_t@1@B
40 )
41
42 # Compiler added symbols for static variables. NOT for VStudio < 2015
43 set(ClangReplInterpreterTests_exports ${ClangReplInterpreterTests_exports} _Init_thread_abort _Init_thread_epoch
44 _Init_thread_footer _Init_thread_header _tls_index
45 )
46
47 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
48 # new/delete variants needed when linking to static msvc runtime (esp. Debug)
49 set(ClangReplInterpreterTests_exports ${ClangReplInterpreterTests_exports}
50 ??2@YAPEAX_K@Z
51 ??3@YAXPEAX@Z
52 ??_U@YAPEAX_K@Z
53 ??_V@YAXPEAX@Z
54 ??3@YAXPEAX_K@Z
55 )
56 else()
57 set(ClangReplInterpreterTests_exports ${ClangReplInterpreterTests_exports}
58 ??2@YAPAXI@Z
59 ??3@YAXPAX@Z
60 ??3@YAXPAXI@Z
61 ??_U@YAPAXI@Z
62 ??_V@YAXPAX@Z
63 ??_V@YAXPAXI@Z
64 )
65 endif()
66
67 # List to '/EXPORT:sym0 /EXPORT:sym1 /EXPORT:sym2 ...'
68 foreach(sym ${ClangReplInterpreterTests_exports})
69 set(ClangReplInterpreterTests_link_str "${ClangReplInterpreterTests_link_str} /EXPORT:${sym}")
70 endforeach(sym ${ClangReplInterpreterTests_exports})
71
72 set_property(TARGET ClangReplInterpreterTests APPEND_STRING PROPERTY LINK_FLAGS ${ClangReplInterpreterTests_link_str})
73
74 endif(MSVC)