<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - lldb CMake fails when -DLLDB_DISABLE_PYTHON=ON and epydoc is present"
   href="https://bugs.llvm.org/show_bug.cgi?id=43637">43637</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lldb CMake fails when -DLLDB_DISABLE_PYTHON=ON and epydoc is present
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>9.0
          </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>cmake
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ofv@wanadoo.es
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22650" name="attach_22650" title="Suggested fix">attachment 22650</a> <a href="attachment.cgi?id=22650&action=edit" title="Suggested fix">[details]</a></span>
Suggested fix

On tools/lldb/docs/CMakeLists.txt we have

find_program(EPYDOC_EXECUTABLE NAMES epydoc epydoc.py)
if(EPYDOC_EXECUTABLE)
  ...
  get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)

so the get_target command is executed whenever epydoc is present.

But the target swig_wrapper is defined in lldb/scripts/CMakeFiles.txt, which is
included from lldb/CMakeLists.txt:

if (NOT LLDB_DISABLE_PYTHON)
  add_subdirectory(scripts)
endif ()

hence swig_wrapper is defined only when LLDB_DISABLE_PYTHON is OFF.

Attached patch with suggested fix.</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>