[llvm] f8287f6 - Fix build if ITTAPI_SOURCE_DIR is specified (#106924)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 16:23:57 PST 2025


Author: Zentrik
Date: 2025-02-04T11:23:54+11:00
New Revision: f8287f6c373fcf993643dd6f0e30dde304c1be73

URL: https://github.com/llvm/llvm-project/commit/f8287f6c373fcf993643dd6f0e30dde304c1be73
DIFF: https://github.com/llvm/llvm-project/commit/f8287f6c373fcf993643dd6f0e30dde304c1be73.diff

LOG: Fix build if ITTAPI_SOURCE_DIR is specified (#106924)

de92615d68f allows specifying the source directory of ittapi. This
change allows configuring the source directory of ittapi here as well.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
    llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
index b4fd04d65e2631..56c529c08937c5 100644
--- a/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt
@@ -1,5 +1,8 @@
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
-include_directories( ${PROJECT_BINARY_DIR}/ittapi/include/ )
+if(NOT DEFINED ITTAPI_SOURCE_DIR)
+    set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
+endif()
+include_directories( ${ITTAPI_SOURCE_DIR}/ittapi/include/ )
 add_llvm_component_library(LLVMIntelJITEvents
   IntelJITEventListener.cpp
 

diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt b/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
index 3d1dfe758c79dd..03677d610cbb76 100644
--- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/CMakeLists.txt
@@ -6,7 +6,10 @@ set(intel_jit_profiling )
 if( LLVM_USE_INTEL_JITEVENTS )
   set(intel_jit_profiling IntelJITProfiling)
   include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../IntelJITProfiling)
-  include_directories(${PROJECT_BINARY_DIR}/ittapi/include/ )
+  if(NOT DEFINED ITTAPI_SOURCE_DIR)
+      set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
+  endif()
+  include_directories(${ITTAPI_SOURCE_DIR}/ittapi/include/ )
 endif()
 
 add_llvm_component_library(LLVMOrcTargetProcess


        


More information about the llvm-commits mailing list