VS: INTERPROCEDURAL_OPTIMIZATION defaults to /LTCG:incremental
User hdf89shfdfs created a public github to demonstrate this issue.
The code above turns on LTO but not in an always desirable fashion.
It sets /LTCG to be INCREMENTAL. Which isn’t what users will expect,
INCREMENTAL might be desirable for debug, relwithdebinfo, etc. But not release. But it looks like users have no control over it.
This issue is Windows MSVC specific.
Here is a link to the discourse: https://discourse.cmake.org/t/cmake-ipo-issue-msvc-ltcg-incremental/826