CMake 3.13 Interprocedural Optimization for Visual C++: Whole Program Optimization (LTCG)
I'm very pleased that CMake 3.13 (just released) includes the "IPO for
VS" feature that I implemented, with help from Brad Kind: it allows
enabling Whole Program Optimization (Link Time Code Generation) on a
Visual C++ project, by means of CMake flag INTERPROCEDURAL_OPTIMIZATION.
Visual Studio offers this option (LTCG) for more than a decade already,
within the IDE. I'm glad that it's now also directly available to
In general, I would suggest to enable this option only for a Release
build. As follows:
I'm interested to hear from other VS/CMake users if they find this new
option helpful. And specifically whether they experience a significant
performance gain from their application, after enabling IPO.