aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ExecutionEngine/JIT/CMakeLists.txt
blob: d43d72de40952f7fe358c43019ee2bdc16356fce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
set(LLVM_LINK_COMPONENTS
  asmparser
  bitreader
  bitwriter
  jit
  nativecodegen
  )

# HACK: Declare a couple of source files as optionally compiled to satisfy the
# missing-file-checker in LLVM's weird CMake build.
set(LLVM_OPTIONAL_SOURCES
  IntelJITEventListenerTest.cpp
  OProfileJITEventListenerTest.cpp
  )

if( LLVM_USE_INTEL_JITEVENTS )
  include_directories( ${LLVM_INTEL_JITEVENTS_INCDIR} )
  link_directories( ${LLVM_INTEL_JITEVENTS_LIBDIR} )
  set(ProfileTestSources
    IntelJITEventListenerTest.cpp
    )
  set(LLVM_LINK_COMPONENTS
    ${LLVM_LINK_COMPONENTS}
    IntelJITEvents
    ) 
endif( LLVM_USE_INTEL_JITEVENTS )

if( LLVM_USE_OPROFILE )
  set(ProfileTestSources
    ${ProfileTestSources}
    OProfileJITEventListenerTest.cpp
    )
  set(LLVM_LINK_COMPONENTS
    ${LLVM_LINK_COMPONENTS}
    OProfileJIT
    )
endif( LLVM_USE_OPROFILE )

set(JITTestsSources
  JITEventListenerTest.cpp
  JITMemoryManagerTest.cpp
  JITTest.cpp
  MultiJITTest.cpp
  ${ProfileTestSources}
  )

if(MSVC)
  list(APPEND JITTestsSources JITTests.def)
endif()

add_llvm_unittest(JITTests
  ${JITTestsSources}
  )

if(MINGW OR CYGWIN)
  set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
endif()