• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
2
3set(GIT_REPOSITORY https://github.com/intel/ittapi.git)
4set(GIT_TAG v3.18.8)
5
6if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/ittapi)
7    execute_process(COMMAND ${GIT_EXECUTABLE} clone ${GIT_REPOSITORY}
8                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
9                    RESULT_VARIABLE GIT_CLONE_RESULT)
10    if(NOT GIT_CLONE_RESULT EQUAL "0")
11        message(FATAL_ERROR "git clone ${GIT_REPOSITORY} failed with ${GIT_CLONE_RESULT}, please clone ${GIT_REPOSITORY}")
12    endif()
13endif()
14
15execute_process(COMMAND ${GIT_EXECUTABLE} checkout ${GIT_TAG}
16                WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ittapi
17                RESULT_VARIABLE GIT_CHECKOUT_RESULT)
18if(NOT GIT_CHECKOUT_RESULT EQUAL "0")
19    message(FATAL_ERROR "git checkout ${GIT_TAG} failed with ${GIT_CHECKOUT_RESULT}, please checkout ${GIT_TAG} at ${CMAKE_CURRENT_SOURCE_DIR}/ittapi")
20endif()
21
22include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/ittapi/include/ )
23
24if( HAVE_LIBDL )
25    set(LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS})
26endif()
27
28set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS})
29
30
31add_llvm_component_library(LLVMIntelJITEvents
32  IntelJITEventListener.cpp
33  jitprofiling.c
34  ittapi/src/ittnotify/ittnotify_static.c
35
36  LINK_LIBS ${LLVM_INTEL_JIT_LIBS}
37
38  LINK_COMPONENTS
39  CodeGen
40  Core
41  DebugInfoDWARF
42  Support
43  Object
44  ExecutionEngine
45)
46
47add_dependencies(LLVMIntelJITEvents LLVMCodeGen)
48