Skip to content
  • Chris Bieneman's avatar
    [CMake] Allow parent projects to use in-source builds · 2a0a8fb6
    Chris Bieneman authored
    LLVM checks if it is performing an in-source build and then stop the
    build. However, this check is also triggered if LLVM is being build as
    part of a parent project, which prevents the parent project itself from
    using in-source builds. For example, CMake allows a parent project to
    specify the output of its subproject:
    
    add_subdirectory(llvm llvm_build)
    
    This tells CMake to conduct an out-tree build of LLVM, which without
    this patch will still fails because what is being tested is the parent
    project, not LLVM. This is fixed by using the "CURRENT" variable, which
    is only concerned by the CMakeLists that is actually bein processed at
    the moment.
    
    Tests:
    Ran `make check-llvm`.
    
    Patch by Henrique Jung <henriquenj_AT_gmail_DOT_com>
    
    llvm-svn: 316142
    2a0a8fb6
Loading