@@ -9,26 +9,28 @@ if(NOT DEFINED ITTAPI_GIT_TAG)
9
9
endif ()
10
10
11
11
if (NOT DEFINED ITTAPI_SOURCE_DIR)
12
- set (ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR} )
12
+ set (ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR} /ittapi )
13
13
endif ()
14
14
15
- if (NOT EXISTS ${ITTAPI_SOURCE_DIR} /ittapi)
16
- execute_process (COMMAND ${GIT_EXECUTABLE} clone ${ITTAPI_GIT_REPOSITORY}
17
- WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR}
18
- RESULT_VARIABLE GIT_CLONE_RESULT)
15
+ if (NOT EXISTS "${ITTAPI_SOURCE_DIR} " )
16
+ execute_process (
17
+ COMMAND "${GIT_EXECUTABLE} " clone "${ITTAPI_GIT_REPOSITORY} " "${ITTAPI_SOURCE_DIR} "
18
+ RESULT_VARIABLE GIT_CLONE_RESULT
19
+ )
19
20
if (NOT GIT_CLONE_RESULT EQUAL "0" )
20
- message (FATAL_ERROR "git clone ${ITTAPI_GIT_REPOSITORY} failed with ${GIT_CLONE_RESULT} , please clone ${ITTAPI_GIT_REPOSITORY} " )
21
+ message (FATAL_ERROR "git clone ${ITTAPI_GIT_REPOSITORY} failed with ${GIT_CLONE_RESULT} , please clone ${ITTAPI_GIT_REPOSITORY} manually " )
21
22
endif ()
22
- endif ()
23
23
24
- execute_process (COMMAND ${GIT_EXECUTABLE} checkout ${ITTAPI_GIT_TAG}
25
- WORKING_DIRECTORY ${ITTAPI_SOURCE_DIR} /ittapi
26
- RESULT_VARIABLE GIT_CHECKOUT_RESULT)
27
- if (NOT GIT_CHECKOUT_RESULT EQUAL "0" )
28
- message (FATAL_ERROR "git checkout ${ITTAPI_GIT_TAG} failed with ${GIT_CHECKOUT_RESULT} , please checkout ${ITTAPI_GIT_TAG} at ${ITTAPI_SOURCE_DIR} /ittapi" )
24
+ execute_process (
25
+ COMMAND "${GIT_EXECUTABLE} " -C "${ITTAPI_SOURCE_DIR} " checkout "${ITTAPI_GIT_TAG} "
26
+ RESULT_VARIABLE GIT_CHECKOUT_RESULT
27
+ )
28
+ if (NOT GIT_CHECKOUT_RESULT EQUAL "0" )
29
+ message (FATAL_ERROR "git checkout ${ITTAPI_GIT_TAG} failed with ${GIT_CHECKOUT_RESULT} , please checkout ${ITTAPI_GIT_TAG} at ${ITTAPI_SOURCE_DIR} manually" )
30
+ endif ()
29
31
endif ()
30
32
31
- include_directories ( ${ITTAPI_SOURCE_DIR} /ittapi/ include / )
33
+ include_directories ( ${ITTAPI_SOURCE_DIR} /include / )
32
34
33
35
if ( HAVE_LIBDL )
34
36
set (LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS} )
@@ -39,7 +41,7 @@ set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS})
39
41
40
42
add_llvm_component_library(LLVMIntelJITProfiling
41
43
jitprofiling.c
42
- ${ITTAPI_SOURCE_DIR} /ittapi/ src/ittnotify/ittnotify_static.c
44
+ ${ITTAPI_SOURCE_DIR} /src/ittnotify/ittnotify_static.c
43
45
44
46
LINK_LIBS ${LLVM_INTEL_JIT_LIBS}
45
47
0 commit comments