[PATCH] D45328: llvm-exegesis: Fix unittests include dirs when llvm is a part of another project

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 10:20:34 PDT 2018


kzhuravl created this revision.
kzhuravl added a reviewer: courbet.
Herald added subscribers: tschuett, Anastasia, mgorny, wdng.

When llvm is a part of another project (opencl in my case), CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR are pointing to the parent project, which lead to build failures.


https://reviews.llvm.org/D45328

Files:
  unittests/tools/llvm-exegesis/CMakeLists.txt


Index: unittests/tools/llvm-exegesis/CMakeLists.txt
===================================================================
--- unittests/tools/llvm-exegesis/CMakeLists.txt
+++ unittests/tools/llvm-exegesis/CMakeLists.txt
@@ -1,7 +1,7 @@
 include_directories(
-  ${CMAKE_SOURCE_DIR}/lib/Target/X86
-  ${CMAKE_BINARY_DIR}/lib/Target/X86
-  ${CMAKE_SOURCE_DIR}/tools/llvm-exegesis/lib
+  ${LLVM_MAIN_SRC_DIR}/lib/Target/X86
+  ${LLVM_BINARY_DIR}/lib/Target/X86
+  ${LLVM_MAIN_SRC_DIR}/tools/llvm-exegesis/lib
   )
 
 set(LLVM_LINK_COMPONENTS


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45328.141178.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180405/43f1d990/attachment.bin>


More information about the llvm-commits mailing list