premake / premake-core

Premake
https://premake.github.io/
BSD 3-Clause "New" or "Revised" License
3.22k stars 620 forks source link

vectorextensions doesn't work with platforms? #1242

Closed TrianglesPCT closed 5 years ago

TrianglesPCT commented 5 years ago

I have platforms Win64_AVX2, Win64_SSE2, Win64_SSE4 etc

I'm using this to filter the platforms and set the appropriate vectorextensions.

filter { "platforms:Win64_AVX2" } system "Windows" architecture "x64" vectorextensions "AVX2"

filter { "platforms:Win64_SSE4" } system "Windows" architecture "x64" vectorextensions "SSE4.1"

filter { "platforms:Win64_SSE2" } system "Windows" architecture "x64" vectorextensions "SSE2"

But when I inspect the "Enable Enhanced Instruction Set" flag in the project settings in Visual Studio(2017), the only one that gets set is the AVX2 build.

The other platforms are set to "Not Set"

Is this supposed to work? If not, is there another way to do it?

I am using the current Premake5 alpha binary for windows available here: https://premake.github.io/download.html

samsinsane commented 5 years ago

According to this block: https://github.com/premake/premake-core/blob/cda4f94e288393d6672c4e0d7fdbebee2d2439a3/modules/vstudio/vs2010_vcxproj.lua#L1662-L1670

The SSE* and IA32 options aren't available for 64bit, and according to this PR the VS compiler will complain about those options being set as they're implied by the architecture. Is this no longer the case?

TrianglesPCT commented 5 years ago

It looks like you are correct-- I'll close this