@@ -9,26 +9,28 @@ if(NOT DEFINED ITTAPI_GIT_TAG)
99endif ()
1010
1111if (NOT DEFINED ITTAPI_SOURCE_DIR)
12- set (ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR} )
12+ set (ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR} /ittapi )
1313endif ()
1414
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+ )
1920 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 " )
2122 endif ()
22- endif ()
2323
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 ()
2931endif ()
3032
31- include_directories ( ${ITTAPI_SOURCE_DIR} /ittapi/ include / )
33+ include_directories ( ${ITTAPI_SOURCE_DIR} /include / )
3234
3335if ( HAVE_LIBDL )
3436 set (LLVM_INTEL_JIT_LIBS ${CMAKE_DL_LIBS} )
@@ -39,7 +41,7 @@ set(LLVM_INTEL_JIT_LIBS ${LLVM_PTHREAD_LIB} ${LLVM_INTEL_JIT_LIBS})
3941
4042add_llvm_component_library(LLVMIntelJITProfiling
4143 jitprofiling.c
42- ${ITTAPI_SOURCE_DIR} /ittapi/ src/ittnotify/ittnotify_static.c
44+ ${ITTAPI_SOURCE_DIR} /src/ittnotify/ittnotify_static.c
4345
4446 LINK_LIBS ${LLVM_INTEL_JIT_LIBS}
4547
0 commit comments