[CMake] INTERPROCEDURAL_OPTIMIZATION

Leif Walsh leif.walsh at gmail.com
Thu May 10 19:56:46 EDT 2012


How does this work?

 % cmake --help-property INTERPROCEDURAL_OPTIMIZATION
cmake version 2.8.8
  INTERPROCEDURAL_OPTIMIZATION
       Enable interprocedural optimization for targets in a directory.

       If set to true, enables interprocedural optimizations if they are
       known to be supported by the compiler.

During Release builds, I want to use -flto if I have a recent enough gcc,
and -ip -ipo1 if I have icc.  I currently detect and set these manually.
It would be nice if I could trust this property, but this doesn't say much
about exactly what it does.  In particular, I want -ipo1, not -ipo0 or
-ipo.

-- 
Cheers,
Leif


More information about the CMake mailing list