<html>
    <head>
      <base href="http://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 --- - CMake build doesn't set LLVM_ENABLE_PLUGINS properly"
   href="http://llvm.org/bugs/show_bug.cgi?id=21134">21134</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>CMake build doesn't set LLVM_ENABLE_PLUGINS properly
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ransford@cs.washington.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13119" name="attach_13119" title="CMakeLists.txt">attachment 13119</a> <a href="attachment.cgi?id=13119&action=edit" title="CMakeLists.txt">[details]</a></span>
CMakeLists.txt

Building {llvm,cfe,compiler-rt}-3.5.0 out of tree with CMake correctly puts the
"AddLLVM" CMake files in $PREFIX/share/llvm/cmake/, but trying to use this
machinery to build an out-of-tree pass with CMake, the
add_llvm_loadable_module() function complains "Loadable modules not supported
on this platform" and generates a Makefile that doesn't build the pass.  Under
{llvm,cfe}-3.4.2 and compiler-rt-3.4 with identical CMake build commands for
LLVM and the pass, CMake produced a correct Makefile.

Both versions of LLVM (+ Clang, + compiler-rt) built with (substitute 3.4.2,
3.5.0 for X.X.X):

  $ cmake -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=/tmp/llvm-X.X.X /tmp/llvm-X.X.X.src

Pass code and CMakeLists.txt attached.  Build with:

  $ mkdir build
  $ cd build
  $ cmake -DLLVM_ROOT=/tmp/llvm-X.X.X ..

It appears that the rules in $PREFIX/share/llvm/cmake/ aren't setting
LLVM_ENABLE_PLUGINS properly when X.X.X == 3.5.0.

Tested on both Linux and OS X (Mavericks) -- same bug.</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>