Update cmake files.
authorJacques Pienaar <jpienaar@google.com>
Wed, 24 Jul 2019 03:09:11 +0000 (20:09 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 24 Jul 2019 03:09:36 +0000 (20:09 -0700)
Use MLIR_MAIN_SRC_DIR that also works if MLIR is not checked out in projects
directory & simplify dir for EDSC test.

PiperOrigin-RevId: 259664306

mlir/CMakeLists.txt
mlir/include/mlir/EDSC/CMakeLists.txt

index f03d283..86266a2 100644 (file)
@@ -1,5 +1,5 @@
 # MLIR project.
-set(MLIR_MAIN_SRC_DIR ${LLVM_MAIN_SRC_DIR}/projects/mlir/include ) # --src-root
+set(MLIR_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include ) # --src-root
 set(MLIR_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include ) # --includedir
 set(MLIR_TABLEGEN_EXE mlir-tblgen)
 
index f26c3a7..0b6f249 100644 (file)
@@ -1,3 +1,3 @@
-set(LLVM_TARGET_DEFINITIONS "${MLIR_MAIN_SRC_DIR}/../test/mlir-tblgen/reference-impl.td")
+set(LLVM_TARGET_DEFINITIONS "${MLIR_SOURCE_DIR}/test/mlir-tblgen/reference-impl.td")
 mlir_tablegen("reference-impl.inc" -gen-reference-implementations)
 add_public_tablegen_target(MLIRReferenceImplementationTestGen)