Author: Tom Stellard
Date: 2023-01-27T11:16:03-08:00
New Revision: 8040e3a4deeb25edc34fb4f89e032ff58ad50572

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

LOG: libclc: Fix building against an llvm build directory

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142718

Added: 
    

Modified: 
    libclc/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 0e21a861d8985..f712100689b09 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -105,7 +105,10 @@ endif()
 
 enable_language( CLC LLAsm )
 # This needs to be set before any target that needs it
-include_directories( ${LLVM_INCLUDE_DIR} )
+# We need to use LLVM_INCLUDE_DIRS here, because if we are linking to an
+# llvm build directory, this includes $src/llvm/include which is where all the
+# headers are not $build/include/ which is what LLVM_INCLUDE_DIR is set to.
+include_directories( ${LLVM_INCLUDE_DIRS} )
 
 # Setup prepare_builtins tools
 set(LLVM_LINK_COMPONENTS


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to