EnableEnhancedInstructionSet
Item metadata.Not Set
.<PropertyGroup>
<Instruction_Set>NotSet</Instruction_Set>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<EnableEnhancedInstructionSet>$(Instruction_Set)</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
2) 然后,您可以使用以下类似的msbuild命令行来设置它:
msbuild xxx\xxx.vcxproj -t:build -p:Instruction_Set=StreamingSIMDExtensions
msbuild xxx\xxx.vcxproj -t:build -p:Instruction_Set=xxx
===========================================
更新
我已经在VS2019下成功测试了所有参数。但我想知道哪里出了问题。
请看以下内容:
a) 使用SSE:
msbuild xxx\xxx.vcxproj -t:build -p:Instruction_Set=StreamingSIMDExtensions
b) 使用 AVX:
msbuild xxx\xxx.vcxproj -t:build -p:Instruction_Set=AdvancedVectorExtensions
c) 使用 AVX512:
msbuild xxx\xxx.vcxproj -t:build -p:Instruction_Set=AdvancedVectorExtensions512
d) 使用 IA32:
msbuild xxx\xxx.vcxproj -t:build -p:Instruction_Set=NoExtensions