<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Supporting the Intel Compiler -- building static libraries</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi all,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> We're using the Intel compiler for some of our builds of ITK. The "-fast" option tries to statically link. So I thought I'd build Insight statically. The problem occurred when I tried to use the static libraries generated by "/usr/bin/ar", and the symbols could not be found. Turns out that the Intel compiler requires you to use their version of ar, namely xiar.</FONT></P>
<P><FONT SIZE=2 FACE="Arial"> I tried all the obvious things like changing "CMAKE_AR" in my cache file, defining an AR environment variable, a -DCMAKE_AR=xiar to CMake, etc. Turns out that the value is cached in CMakeFiles/CMakeCXXCompiler.cmake, but no good way to change it (the CMakeCXXCompiler.cmake overrides CMakeCache.txt) short of editing the file (which is what I ended up doing).</FONT></P>
<P><FONT SIZE=2 FACE="Arial"> Could the CMake developers provide an easy way to override the CMAKE_AR command to make linking statically with the Intel compiler straightforward?</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Thanks much,</FONT>
<BR><FONT SIZE=2 FACE="Arial">-dan</FONT>
</P>
<P><B><FONT SIZE=2 FACE="Arial">Daniel Blezek, PhD</FONT></B>
<BR><FONT SIZE=2 FACE="Arial">Medical Imaging Informatics Innovation Center</FONT>
<BR><FONT SIZE=2 FACE="Arial">Enterprise Imaging Systems Unit</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">P 127 or (77) 8 8886</FONT>
<BR><FONT SIZE=2 FACE="Arial">T 507 538 8886</FONT>
<BR><FONT SIZE=2 FACE="Arial">E blezek.daniel@mayo.edu</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Mayo Clinic</FONT>
<BR><FONT SIZE=2 FACE="Arial">200 First St. S.W.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Harwick SL-44</FONT>
<BR><FONT SIZE=2 FACE="Arial">Rochester, MN 55905</FONT>
<BR><FONT SIZE=2 FACE="Arial">mayoclinic.org</FONT>
</P>
</BODY>
</HTML>