GPUOpen-Tools / compressonator

Tool suite for Texture and 3D Model Compression, Optimization and Analysis using CPUs, GPUs and APUs
1.3k stars 198 forks source link

Build error on MSVC #325

Open psadda opened 6 days ago

psadda commented 6 days ago

There is a typo in CMP_Core that leads to a build error on MSVC

https://github.com/GPUOpen-Tools/compressonator/blob/f4b53d79ec5abbb50924f58aebb7bf2793200b94/cmp_core/CMakeLists.txt#L99C52-L99C65

/arch:AVX-512 should instead be /arch:AVX512

The bad flag leads to a warning: ignoring invalid /arch: argument 'AVX-512'; for 64-bit expected one of AVX, AVX2, AVX512, AVX512F. The warning in turn leads to dozens of downstream compilation errors because the expected intrinsics are not available.

On a semi-related note, the if (WIN32) conditionals in this CMake file should probably be replaced with if (MSVC). (I don't think MinGW would like receiving those MSVC style arguments.)