<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - LLVMConfig.cmake file generated by autoconf build is corrupted"
   href="https://llvm.org/bugs/show_bug.cgi?id=26187">26187</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVMConfig.cmake file generated by autoconf build is corrupted
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.7
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>autoconf
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>flashmozzg@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When I tried to upgrade llvm 3.6 to llvm 3.7 in my project I encountered an
error on travis ci OSX build:
CMake Error at
/usr/local/opt/llvm37/lib/llvm-3.7/share/llvm/cmake/LLVMConfig.cmake:54
(include):
  include could not find load file:
    /LLVMExports.cmake

After some investigations i found that LLVMConfig.cmake file is at fault.
Look at this:
# Compute the CMake directory from the LLVMConfig.cmake file location.n
get_filename_component(_LLVM_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)n #
Compute the installation prefix from the LLVMConfig.cmake file location.n
get_filename_component(LLVM_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)n
get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)n
get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)n
get_filename_component(LLVM_INSTALL_PREFIX "${LLVM_INSTALL_PREFIX}" PATH)n
set(_LLVM_LIBRARY_DIR "${LLVM_INSTALL_PREFIX}/lib")

You can see that for some reason newlines ('\n') became just 'n', so it's all
became part of the comment therefore needed vars weren't set.

If I build llvm using cmake it generates correct file. The problem occures only
with autotools build. Tested on travis with:
...
script:
 - ../configure --enable-optimized --disable-bindings --enable-targets=host
--enable-shared --enable-libffi
 - make -j4
...</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>