What is in the add_subdirectory call on line 139 of CMakeLists.txt?<div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">     CMakeLists.txt:139 (add_subdirectory):</span><br>
<br></div><div><br><div class="gmail_quote">On Tue, Aug 24, 2010 at 3:57 PM, kent williams <span dir="ltr">&lt;<a href="mailto:nkwmailinglists@gmail.com">nkwmailinglists@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have a CMakeLists.txt file that builds a bunch of prerequisite<br>
library, and then my application I&#39;m working on.<br>
<br>
This is done all with External_Project macros.  Once everything I need<br>
is built, I build my code as an external project:<br>
<br>
set(proj BRAINSTracerQT)<br>
ExternalProject_Add(${proj}<br>
  URL file://${CMAKE_CURRENT_SOURCE_DIR}/${proj}<br>
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${proj}<br>
  DOWNLOAD_COMMAND &quot;&quot;<br>
  DEPENDS  ${VTK_DEPEND} ${SEM_DEPEND}<br>
  CMAKE_GENERATOR ${gen}<br>
  CMAKE_ARGS<br>
    ${LOCAL_CMAKE_BUILD_OPTIONS}<br>
    -DModuleDescriptionParser_DIR:PATH=${MDP_DIR}<br>
    -DITK_DIR:PATH=${ITK_DIR}<br>
    -DVTK_DIR:PATH=${VTK_DIR}<br>
    -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}<br>
 INSTALL_DIR ${BRAINSTracer_BINARY_DIR}<br>
 UPDATE_COMMAND &quot;&quot;<br>
)<br>
<br>
Everything worked in CMake 2.8.1, now I get the errors below.  Very weird.<br>
<br>
<br>
CMake Error at CMakeLists.txt:139 (add_subdirectory):<br>
  The binary directory<br>
<br>
    /scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/vtkRenderingAddOn<br>
<br>
  is already used to build a source directory.  It cannot be used to build<br>
  source directory<br>
<br>
    /scratch/kent/newbuild/BRAINSTracerQT/BRAINSTracerQT/vtkRenderingAddOn<br>
<br>
  Specify a unique binary directory name.<br>
<br>
<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_BTMainWindow.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QVtkImageViewer.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_qtcolorpicker.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QVtkPropertyDialog.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QModuleParameterWidget.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QImageParameterWidget.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QFileBrowserParameterWidget.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QImageTransformDialog.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_MyQTreeWidget.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QImageSaveFileDialog.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QRunProgramDialog.cxx.rule&quot;<br>
which already has a custom rule.<br>
CMake Error: Attempt to add a custom rule to output<br>
&quot;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/moc_QEnumSpinBox.cxx.rule&quot;<br>
which already has a custom rule.<br>
-- ITK LIBRARIES<br>
ITKAlgorithms;ITKStatistics;ITKFEM;itkNetlibSlatec;itkv3p_lsqr;ITKEXPAT;itksys<br>
-- FIXUP_BUNDLE_DIRS =<br>
/opt/Qt4.6.3/lib;/scratch/kent/newbuild/BT-build/lib/InsightToolkit;/scratch/kent/newbuild/BT-build/lib/vtk-5.6;/scratch/kent/newbuild/BT-build/lib;/scratch/kent/newbuild/BT-build/lib/ModuleDescriptionParser;/lib;/scratch/kent/newbuild/BT-build/BRAINSTracerQT-prefix/src/BRAINSTracerQT-build/vtkRenderingAddOn;/opt/Qt4.6.3/plugins/imageformats<br>

-- ITK LIBRARIES<br>
ITKAlgorithms;ITKStatistics;ITKFEM;itkNetlibSlatec;itkv3p_lsqr;ITKEXPAT;itksys;itkNetlibSlatec;itkv3p_lsqr;ITKEXPAT;itksys<br>
CMake Error at CMakeLists.txt:328 (add_executable):<br>
  add_executable cannot create target &quot;BRAINSTracerQT&quot; because another target<br>
  with the same name already exists.  The existing target is an executable<br>
  created in source directory<br>
  &quot;/scratch/kent/newbuild/BRAINSTracerQT/BRAINSTracerQT&quot;.  See documentation<br>
  for policy CMP0002 for more details.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>