I’ve create 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 I want for release configs.
I might want INCREMENTAL for debug, relwithdebinfo, etc. But not release. But it looks like I have no control over it.