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
llvm-svn: 329325
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