When you tell CMake under Linux to use ICC, there's no automatic
detection of the custom archiver and linker that ICC requires. The
following lines fix that, but would it be possible to add them to the
stock CMake files someplace so that using ICC becomes slightly more
transparent?
# Intel(R) Compiler has its own library archiver,
# if you build libraries and do not use xiar,
# the Intel compiler will complain about invalid
# archives at the link phase.
# The Intel(R) archiver is "xiar" usually
# located in the same folder as the compiler,
# /opt/intel/Compiler/nn/n.nn/ia32/bin/xiar
# for example.
FIND_PROGRAM(XIAR xiar)
IF(XIAR)
SET(CMAKE_AR "${XIAR}")
ENDIF(XIAR)
MARK_AS_ADVANCED(XIAR)
# Intel(R) Compiler also comes with its own linker
# which provides a number of additional benefits when
# linking code compiled with the Intel(R) compiler.
# Again, usually in the same place as icc itself,
# /opt/intel/COmpiler/nn/n.nn/ia32/bin/xild per e.g
FIND_PROGRAM(XILD xild)
IF(XILD)
SET(CMAKE_LINKER "${XILD}")
ENDIF(XILD)
MARK_AS_ADVANCED(XILD)
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake