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