• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1set(LLVM_LINK_COMPONENTS
2  asmparser
3  bitreader
4  bitwriter
5  jit
6  nativecodegen
7  )
8
9# HACK: Declare a couple of source files as optionally compiled to satisfy the
10# missing-file-checker in LLVM's weird CMake build.
11set(LLVM_OPTIONAL_SOURCES
12  IntelJITEventListenerTest.cpp
13  OProfileJITEventListenerTest.cpp
14  )
15
16if( LLVM_USE_INTEL_JITEVENTS )
17  include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} )
18  link_directories( ${LLVM_INTEL_JITEVENTS_LIBDIR} )
19  set(ProfileTestSources
20    IntelJITEventListenerTest.cpp
21    )
22  set(LLVM_LINK_COMPONENTS
23    ${LLVM_LINK_COMPONENTS}
24    IntelJITEvents
25    )
26endif( LLVM_USE_INTEL_JITEVENTS )
27
28if( LLVM_USE_OPROFILE )
29  set(ProfileTestSources
30    ${ProfileTestSources}
31    OProfileJITEventListenerTest.cpp
32    )
33  set(LLVM_LINK_COMPONENTS
34    ${LLVM_LINK_COMPONENTS}
35    OProfileJIT
36    )
37endif( LLVM_USE_OPROFILE )
38
39set(JITTestsSources
40  JITEventListenerTest.cpp
41  JITMemoryManagerTest.cpp
42  JITTest.cpp
43  MultiJITTest.cpp
44  ${ProfileTestSources}
45  )
46
47if(MSVC)
48  list(APPEND JITTestsSources JITTests.def)
49endif()
50
51add_llvm_unittest(JITTests
52  ${JITTestsSources}
53  )
54
55if(MINGW OR CYGWIN)
56  set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
57endif()
58