[CMake] ICC under Linux

Brad King brad.king at kitware.com
Wed Mar 24 11:46:24 EDT 2010


Oliver Smith wrote:
> When you tell CMake under Linux to use ICC, there's no automatic
> detection of the custom archiver and linker that ICC requires.

The Intel compiler requires them only when objects are built with -ipo.

> 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?

There is some history here:

  http://www.cmake.org/Bug/view.php?id=9615

We used to use xiar always but it is very slow even in cases when
it is not needed.  Now it is enabled by a property:

  http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:INTERPROCEDURAL_OPTIMIZATION

which adds both -ipo and uses xiar as necessary.  See also:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c5139627

-Brad


More information about the CMake mailing list