I am also getting alot of ISO C++ errors. What would be the likely cause for this error?<br><br><div><span class="gmail_quote">On 9/24/06, <b class="gmail_sendername">Gaëtan Lehmann</b> &lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr">
gaetan.lehmann@jouy.inra.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi Sonali,<br><br>Can you try to add the command
<br><br>&nbsp;&nbsp; INCLUDE_DIRECTORIES(&quot;${CMAKE_CURRENT_SOURCE_DIR}&quot;)<br><br>in the CMakeLists.txt files in your subdirectories ?<br><br>Thanks,<br><br>Gaetan<br><br><br><br>Le Sat, 23 Sep 2006 02:36:34 +0200, Sonali Barua &lt;
<a href="mailto:barua.sonali@gmail.com">barua.sonali@gmail.com</a>&gt;<br>a écrit:<br><br>&gt; Hello,<br>&gt;<br>&gt; Thank you for replying.<br>&gt;<br>&gt; Well I am trying to build an ITK class. I have three CMakeLists.txt
<br>&gt; files.<br>&gt;<br>&gt; 1. My code is spread across three directories. Two of them are in the<br>&gt; parent<br>&gt; directory called ExamplePipeline3. The other two BasicFilters and Common<br>&gt; are<br>&gt; within this parent directory and comprises of .h and .txx files. The
<br>&gt; problem<br>&gt; I face is that when I run make&nbsp;&nbsp;it doesn't recognise the files in the<br>&gt; subdirectories BasicFilters and Common. And because of this alot of<br>&gt; errors<br>&gt; occur in my code.<br>&gt;<br>
&gt; 1. The First CMakeLists.txt is in a directory called ExamplePipeline3<br>&gt; PROJECT( PrimMinimumSpanningTree )<br>&gt;<br>&gt; FIND_PACKAGE ( ITK )<br>&gt;<br>&gt; IF ( ITK_FOUND )<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;INCLUDE(${USE_ITK_FILE})
<br>&gt; ELSE (ITK_FOUND)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;MESSAGE(FATAL_ERROR&nbsp;&nbsp;&quot;Cannot build without ITK.&nbsp;&nbsp;Please set ITK_DIR.&quot;)<br>&gt; ENDIF( ITK_FOUND )<br>&gt;<br>&gt; SUBDIRS(BasicFilters Common)<br>&gt;<br>&gt;<br>&gt; ADD_EXECUTABLE( PrimMinimumSpanningTree&nbsp;&nbsp;....some .txx files and .h
<br>&gt; files)<br>&gt;<br>&gt; TARGET_LINK_LIBRARIES ( PrimMinimumSpanningTree ITKBasicFilters ITKCommon<br>&gt; ITKIO)<br>&gt;<br>&gt; 3. The CMakeLists.txt file in BasicFilters :<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;PROJECT(BasicFilters)<br>&gt; MESSAGE(&quot;ItkGraph BasicFilters&quot;)
<br>&gt; ADD_EXECUTABLE(BasicFilters ....some .h and .txx files)<br>&gt;<br>&gt; IF(UNIX)<br>&gt;&nbsp;&nbsp; ADD_DEFINITIONS(&quot;-LANG:std&quot;)<br>&gt; ENDIF(UNIX)<br>&gt; SET_TARGET_PROPERTIES(BasicFilters PROPERTIES LINKER_LANGUAGE CXX)
<br>&gt; TARGET_LINK_LIBRARIES(BasicFilters)<br>&gt;<br>&gt; INSTALL_TARGETS(/lib/ BasicFilters)<br>&gt; INSTALL_FILES(/include/PrimMinimumSpanningTree &quot;\\.h$&quot;)<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;3. The CMakeLists.txt file in Common :
<br>&gt; PROJECT(Common)<br>&gt; MESSAGE(&quot;ItkGraph Common&quot;)<br>&gt; ADD_EXECUTABL(Common&nbsp;&nbsp;...some .h and .txx files)<br>&gt;<br>&gt; IF(UNIX)<br>&gt;&nbsp;&nbsp; ADD_DEFINITIONS(&quot;-LANG:std&quot;)<br>&gt; ENDIF(UNIX)<br>
&gt; SET_TARGET_PROPERTIES(Common PROPERTIES LINKER_LANGUAGE CXX)<br>&gt; TARGET_LINK_LIBRARIES(Common)<br>&gt; INSTALL_TARGETS(/lib/ Common)<br>&gt; INSTALL_FILES(/include/PrimMinimumSpanningTree &quot;\\.h$&quot;)<br>&gt;
<br>&gt;<br>&gt; Would it be possible for you to tell me where I have gone wrong. Those<br>&gt; files<br>&gt; in Common and BasicFilters had not been compiled before.<br>&gt;<br>&gt; Sincerely,<br>&gt;<br>&gt; Sonali Barua.
<br>&gt;<br>&gt;<br>&gt; On 9/18/06, Gaëtan Lehmann &lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr">gaetan.lehmann@jouy.inra.fr</a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Hi Sonali,<br>&gt;&gt;<br>&gt;&gt; Can you provide your 
CMakeLists.txt file, as well as your directory<br>&gt;&gt; structure ?<br>&gt;&gt; It would be easier to help with that :-)<br>&gt;&gt;<br>&gt;&gt; Thanks,<br>&gt;&gt;<br>&gt;&gt; Gaetan<br>&gt;&gt;<br>&gt;&gt; Le Sun, 17 Sep 2006 22:33:46 +0200, Sonali Barua
<br>&gt;&gt; &lt;<a href="mailto:barua.sonali@gmail.com">barua.sonali@gmail.com</a>&gt;<br>&gt;&gt; a écrit:<br>&gt;&gt;<br>&gt;&gt; &gt; Hello,<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Well I have done that. And there are several folders inside a folder
<br>&gt;&gt; &gt; called<br>&gt;&gt; &gt; ItkG. I have added the INCLUDE_DIRECTORIES command and also the<br>&gt;&gt; subdirs<br>&gt;&gt; &gt; command because there were several sub directories inside it. I also<br>&gt;&gt; made
<br>&gt;&gt; &gt; the individual CmakeLists.txt file for each of the subdirs inside this<br>&gt;&gt; &gt; directory. But when I run the cmake . command I get an error that says<br>&gt;&gt; &gt; that<br>&gt;&gt; &gt; they cannot recognise the subdirs mentioned. What must I do in order
<br>&gt;&gt; to<br>&gt;&gt; &gt; make<br>&gt;&gt; &gt; it recognise my dirs in the Include directories command?<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Sincerely,<br>&gt;&gt; &gt;<br>&gt;&gt; &gt; Sonali Barua.<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt; On 9/17/06, Gaëtan Lehmann &lt;<a href="mailto:gaetan.lehmann@jouy.inra.fr">gaetan.lehmann@jouy.inra.fr</a>&gt; wrote:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Le Sun, 17 Sep 2006 03:20:53 +0200, Sonali Barua
<br>&gt;&gt; &gt;&gt; &lt;<a href="mailto:barua.sonali@gmail.com">barua.sonali@gmail.com</a>&gt;<br>&gt;&gt; &gt;&gt; a écrit:<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; &gt; Hello,<br>&gt;&gt; &gt;&gt; &gt;<br>&gt;&gt; &gt;&gt; &gt; I am facing a problem in my 
CMakeLists.txt file. I would like to<br>&gt;&gt; add<br>&gt;&gt; &gt;&gt; &gt; several<br>&gt;&gt; &gt;&gt; &gt; ITK files in a folder that consitutes a library that isn't yet part<br>&gt;&gt; of<br>&gt;&gt; &gt;&gt; &gt; the
<br>&gt;&gt; &gt;&gt; &gt; original ITK library using cmake. What are the commands that I have<br>&gt;&gt; to<br>&gt;&gt; &gt;&gt; &gt; use<br>&gt;&gt; &gt;&gt; &gt; so that my source files can use these set of header and .txx files
<br>&gt;&gt; &gt;&gt; while<br>&gt;&gt; &gt;&gt; &gt; compiling make?<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Hi,<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; The command INCLUDE_DIRECTORIES() should do what you want.<br>&gt;&gt; &gt;&gt; Please look at 
<a href="http://cmake.org/HTML/Documentation.html">http://cmake.org/HTML/Documentation.html</a> or run<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;cmake --help-command INCLUDE_DIRECTORIES<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; for a complete description.
<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Regards,<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; Gaetan<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt;<br>&gt;&gt; &gt;&gt; --<br>&gt;&gt; &gt;&gt; Gaëtan Lehmann
<br>&gt;&gt; &gt;&gt; Biologie du Développement et de la Reproduction<br>&gt;&gt; &gt;&gt; INRA de Jouy-en-Josas (France)<br>&gt;&gt; &gt;&gt; tel: +33 1 34 65 29 66&nbsp;&nbsp;&nbsp;&nbsp;fax: 01 34 65 29 09<br>&gt;&gt; &gt;&gt; <a href="http://voxel.jouy.inra.fr">
http://voxel.jouy.inra.fr</a><br>&gt;&gt; &gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; --<br>&gt;&gt; Gaëtan Lehmann<br>&gt;&gt; Biologie du Développement et de la Reproduction<br>&gt;&gt; INRA de Jouy-en-Josas (France)
<br>&gt;&gt; tel: +33 1 34 65 29 66&nbsp;&nbsp;&nbsp;&nbsp;fax: 01 34 65 29 09<br>&gt;&gt; <a href="http://voxel.jouy.inra.fr">http://voxel.jouy.inra.fr</a><br>&gt;&gt;<br><br><br><br>--<br>Gaëtan Lehmann<br>Biologie du Développement et de la Reproduction
<br>INRA de Jouy-en-Josas (France)<br>tel: +33 1 34 65 29 66&nbsp;&nbsp;&nbsp;&nbsp;fax: 01 34 65 29 09<br><a href="http://voxel.jouy.inra.fr">http://voxel.jouy.inra.fr</a><br></blockquote></div><br>