[PATCH] D76047: [MLIR] Add support for out of tree external projects using MLIR

Stephen Neuendorffer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 14 20:26:26 PDT 2020


stephenneuendorffer marked an inline comment as done.
stephenneuendorffer added inline comments.


================
Comment at: mlir/cmake/modules/CMakeLists.txt:36
+# via CMAKE_MODULE_PATH, place API modules next to it.
+# This should be removed in the future.
+file(COPY .
----------------
mehdi_amini wrote:
> I don't really get what this is doing and what is the removal path?
It's copy-pasted from llvm.  This delivers all the cmake files so that they are available for use in out-of-tree code. I don't 
particularly understand the comment either, which appear to date back to this:

commit 81b580b455426dd885fe4858e5bd3e2f22c00f5f
Author: NAKAMURA Takumi <geek4civic at gmail.com>
Date:   Sun Feb 9 16:35:40 2014 +0000

    Teach LLVMConfig to avoid modifying CMAKE_MODULE_PATH
    
    Do not modify this value on the application's behalf and just ensure API
    modules are always available next to the LLVMConfig module.  This is
    already the case in the install tree so use file(COPY) to make it so in
    the build tree.  Include the LLVM-Config API module from next to the
    LLVMConfig location.
    
    Contributed by Brad King.
    
    llvm-svn: 201047



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76047/new/

https://reviews.llvm.org/D76047





More information about the llvm-commits mailing list