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

Konstantin Zhuravlyov via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 11:16:02 PDT 2018


Author: kzhuravl
Date: Thu Apr  5 11:16:02 2018
New Revision: 329325

URL: http://llvm.org/viewvc/llvm-project?rev=329325&view=rev
Log:
llvm-exegesis: Fix unittests include dirs when llvm is a part of another project

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

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

Modified:
    llvm/trunk/unittests/tools/llvm-exegesis/CMakeLists.txt

Modified: llvm/trunk/unittests/tools/llvm-exegesis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/tools/llvm-exegesis/CMakeLists.txt?rev=329325&r1=329324&r2=329325&view=diff
==============================================================================
--- llvm/trunk/unittests/tools/llvm-exegesis/CMakeLists.txt (original)
+++ llvm/trunk/unittests/tools/llvm-exegesis/CMakeLists.txt Thu Apr  5 11:16:02 2018
@@ -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




More information about the llvm-commits mailing list