<HTML>
<HEAD>
<TITLE>Re: [Insight-users] Problem of Cmake &amp;install ITK</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana"><SPAN STYLE='font-size:12.0px'>Hi Luis,<BR>
<BR>
You are right, when I download and install the cmake 2.03, it is not what I used before, the Cmake 1.80 have a gui ,even for my Mac, so I copy the Cmake 1.80 that &nbsp;I have in other computer.<BR>
That cause the problem.<BR>
<BR>
I type which cmake &nbsp;and cmake &#8212;version . The result is tcsh :cmake: command not found.<BR>
&nbsp;<BR>
Here is the CheckIncludefile.cmake<BR>
<BR>
CheckIncludeFile.cmake 80%#<BR>
# Check if the include file exists.<BR>
#<BR>
# CHECK_INCLUDE_FILE - macro which checks the include file exists.<BR>
# INCLUDE - name of include file<BR>
# VARIABLE - variable to return result<BR>
#<BR>
<BR>
MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)<BR>
&nbsp;&nbsp;IF(&quot;${VARIABLE}&quot; MATCHES &quot;^${VARIABLE}$&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS})<BR>
&nbsp;&nbsp;&nbsp;&nbsp;SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})<BR>
&nbsp;&nbsp;&nbsp;&nbsp;CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;MESSAGE(STATUS &quot;Looking for ${INCLUDE}&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;IF(${ARGC} EQUAL 3)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS})<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SET(CMAKE_C_FLAGS &quot;${CMAKE_C_FLAGS} ${ARGV2}&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;ENDIF(${ARGC} EQUAL 3)<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;TRY_COMPILE(${VARIABLE}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${CMAKE_BINARY_DIR}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${CMAKE_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMAKE_FLAGS <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OUTPUT_VARIABLE OUTPUT) <BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;IF(${ARGC} EQUAL 3)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_SAVE})<BR>
&nbsp;&nbsp;&nbsp;&nbsp;ENDIF(${ARGC} EQUAL 3)<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;IF(${VARIABLE})<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MESSAGE(STATUS &quot;Looking for ${INCLUDE} - found&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SET(${VARIABLE} 1 CACHE INTERNAL &quot;Have include ${INCLUDE}&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Determining if the include file ${INCLUDE} &quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;exists passed with the following output:\n&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;${OUTPUT}\n\n&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;ELSE(${VARIABLE})<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MESSAGE(STATUS &quot;Looking for ${INCLUDE} - not found.&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SET(${VARIABLE} &quot;&quot; CACHE INTERNAL &quot;Have include ${INCLUDE}&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log <BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;Determining if the include file ${INCLUDE} &quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;exists failed with the following output:\n&quot;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;${OUTPUT}\n\n&quot;)<BR>
&nbsp;&nbsp;&nbsp;&nbsp;ENDIF(${VARIABLE})<BR>
&nbsp;&nbsp;ENDIF(&quot;${VARIABLE}&quot; MATCHES &quot;^${VARIABLE}$&quot;)<BR>
ENDMACRO(CHECK_INCLUDE_FILE)<BR>
~<BR>
<BR>
Thank a lot!<BR>
<BR>
How I can uninstall the Cmake 2.0 ?<BR>
<BR>
yingli <BR>
<BR>
<BR>
<BR>
<BR>
On 8/19/04 20:07, &quot;Luis Ibanez&quot; &lt;luis.ibanez@kitware.com&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Monaco"><TT><BR>
<BR>
Hi Yingli,<BR>
<BR>
It seems that your installation of CMake is getting a mix<BR>
of files between versions 1.8 and 2.0.<BR>
<BR>
<BR>
The file that is reporting the error:<BR>
<BR>
&nbsp;&nbsp;&nbsp;usr/local.share/Cmake/Modules/CheckIncludeFile.cmake:16<BR>
<BR>
Should actually have &quot;ARGC&quot; instead of just &quot;ARG&quot;.<BR>
<BR>
<BR>
It seems that you tried to install CMake 1.8 on top of<BR>
CMake 2.0 and now you have an mix of both.<BR>
<BR>
<BR>
<BR>
<BR>
Could you please do the following:<BR>
<BR>
1) &nbsp;&nbsp;&nbsp;type the command:<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;which cmake<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and post to the list the result that you get<BR>
<BR>
<BR>
2) &nbsp;&nbsp;&nbsp;then type the command:<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmake --version<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and post to the list the output that you get.<BR>
<BR>
<BR>
3) &nbsp;&nbsp;Then, send us your file<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;usr/local.share/Cmake/Modules/CheckIncludeFile.cmake<BR>
<BR>
<BR>
<BR>
<BR>
Thanks<BR>
<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Luis<BR>
<BR>
<BR>
<BR>
<BR>
-------------------------<BR>
yingli fan wrote:<BR>
<BR>
&gt; Hi all,<BR>
&gt; <BR>
&gt; I try to install the ITK. &nbsp;When I use Cmake to generate the make file of <BR>
&gt; ITK.<BR>
&gt; <BR>
&gt; Here is an error<BR>
&gt; Cmake Error :Error in cmakecode at <BR>
&gt; usr/local.share/Cmake/Modules/CheckIncludeFile.cmake:16:IF An IF command <BR>
&gt; had incorrect arguments: $ { ARG} EQUAl 3<BR>
&gt; <BR>
&gt; Here is what I did:<BR>
&gt; 1 download the ITK release 1.6.0(because the machine is panther version <BR>
&gt; of Mac, I succeed installing ITK before with this release).<BR>
&gt; 2 generate a new binary folder<BR>
&gt; 3 download the Cmake : here I download release 2.0.3. (Actually with my <BR>
&gt; successful experience, last time I use Cmake release 1.8.0. ) After I <BR>
&gt; install the cmake 2.03 , I cant install the cmake 1.8.0, &nbsp;who can help <BR>
&gt; me to uninstall the Cmake 2.0.3.<BR>
&gt; <BR>
&gt; Thank you for help!<BR>
&gt; <BR>
&gt; Yingli fan<BR>
&gt; <BR>
&gt; <BR>
&gt; ------------------------------------------------------------------------<BR>
&gt; <BR>
&gt; _______________________________________________<BR>
&gt; Insight-users mailing list<BR>
&gt; <FONT COLOR="#0000FF"><U>Insight-users@itk.org<BR>
</U></FONT>&gt; <FONT COLOR="#0000FF"><U><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><BR>
</U></FONT><BR>
<BR>
<BR>
<BR>
</TT></FONT></SPAN></BLOCKQUOTE><SPAN STYLE='font-size:12.0px'><FONT FACE="Monaco"><TT><BR>
</TT></FONT><FONT FACE="Verdana"><BR>
<FONT COLOR="#0000FF">*******************************************************<BR>
Yingli Fan<BR>
</FONT></FONT><FONT COLOR="#0000FF"><FONT FACE="Monaco"><TT>Laboratory for Bioimaging and Anatomical Informatics<BR>
</TT></FONT><FONT FACE="Verdana">Department of Neurobiology &amp; Anatomy<BR>
Drexel University, College of Medicine<BR>
2900 Queen Lane PA 19129<BR>
Tel: 215-9918455 Fax: 215-843-9367<BR>
Email: Yingli.Fan@drexel.edu &nbsp;&nbsp;<BR>
*******************************************************<BR>
</FONT></FONT><FONT FACE="Verdana"><BR>
</FONT></SPAN>
</BODY>
</HTML>