@@ -137,8 +137,16 @@ if(UR_ENABLE_TRACING)
137
137
add_compile_definitions (UR_ENABLE_TRACING )
138
138
139
139
if (UR_BUILD_XPTI_LIBS )
140
- # fetch xpti proxy library for the tracing layer
141
- FetchContentSparse_Declare (xpti https://github.com/intel/llvm.git "nightly-2024-10-22" "xpti" )
140
+ set (UR_XPTI_SOURCE_DIR "${PROJECT_SOURCE_DIR} /../xpti" )
141
+ cmake_path (NORMAL_PATH UR_XPTI_SOURCE_DIR
142
+ OUTPUT_VARIABLE UR_XPTI_SOURCE_DIR )
143
+ if (IS_DIRECTORY "${UR_XPTI_SOURCE_DIR} " )
144
+ FetchContent_Declare (xpti SOURCE_DIR "${UR_XPTI_SOURCE_DIR} " )
145
+ else ()
146
+ # fetch xpti proxy library for the tracing layer
147
+ FetchContentSparse_Declare (xpti https://github.com/intel/llvm.git "nightly-2024-10-22" "xpti" )
148
+ endif ()
149
+
142
150
FetchContent_MakeAvailable (xpti )
143
151
144
152
# set -fPIC for xpti since we are linking it with a shared library
@@ -150,7 +158,14 @@ if(UR_ENABLE_TRACING)
150
158
set (XPTI_DIR ${xpti_SOURCE_DIR} )
151
159
set (XPTI_ENABLE_TESTS OFF CACHE INTERNAL "Turn off xptifw tests" )
152
160
153
- FetchContentSparse_Declare (xptifw https://github.com/intel/llvm.git "nightly-2024-10-22" "xptifw" )
161
+ set (UR_XPTIFW_SOURCE_DIR "${PROJECT_SOURCE_DIR} /../xptifw" )
162
+ cmake_path (NORMAL_PATH UR_XPTIFW_SOURCE_DIR
163
+ OUTPUT_VARIABLE UR_XPTIFW_SOURCE_DIR )
164
+ if (IS_DIRECTORY "${UR_XPTI_SOURCE_DIR} " )
165
+ FetchContent_Declare (xptifw SOURCE_DIR "${UR_XPTIFW_SOURCE_DIR} " )
166
+ else ()
167
+ FetchContentSparse_Declare (xptifw https://github.com/intel/llvm.git "nightly-2024-10-22" "xptifw" )
168
+ endif ()
154
169
155
170
FetchContent_MakeAvailable (xptifw )
156
171
0 commit comments