[CMake] Supporting the Intel Compiler -- building static libraries
Blezek, Daniel J., Ph.D.
Blezek.Daniel at mayo.edu
Thu Apr 17 17:44:24 EDT 2008
Hi all,
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.
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).
Could the CMake developers provide an easy way to override the
CMAKE_AR command to make linking statically with the Intel compiler
straightforward?
Thanks much,
-dan
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center
Enterprise Imaging Systems Unit
P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu
Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080417/64b3f69a/attachment.htm>
More information about the CMake
mailing list