No way to set Visual Studio generation to use `EnableEnhancedInstructionSet` with a value of `NotSet`

I have a project that wishes to set EnableEnhancedInstructionSet to a “NotSet” value for visual studio generation, I currently have to handle this via VS_USER_PROPS, which seems a bit like a hack.

On testing noticed that exposing /arch:NotSet on the relevant flagtables Templates/MSBuild/FlagTables/v143_CL.json I was able to get the desired result which seemed a lot cleaner. EnableEnhancedInstructionSet value explicitly set to NotSet in all relevant vcxproj files.

I am currently trying to figure out what is causing it to default to AVX2, as it seems to be the default option in vs2022 when the EnableEnhancedInstructionSet isn’t found for the vcxproj, instead of NotSet :confused:. When using command line directly, not specifying ofc treats it as NotSet.

Is VS_USER_PROPS the “correct” way to fix this, or is modifying the flagtables.json a viable option?

  • This is just for one x64 platform target of many being ported, so possibly over simplifying the problem.

I think this may be something that makes sense for CMake to expose.

Cc: @brad.king

I’d welcome a merge request that adds such flag table entries.

See this directory.