The options CMake uses for IPO on MSVC can be seen here. It compiles with /GL
and links with /INCREMENTAL:NO /LTCG
. The Visual Studio generator then sends the flags through this mapping to convert them to the actual .vcxproj
content. I think the order of the flags in that mapping may be wrong. You can try hacking that json file in your local installation to switch the two blocks seen in my link.
Please open an issue for this on the CMake Issue Tracker.