bombomby / optick

C++ Profiler For Games
https://optick.dev
MIT License
2.95k stars 296 forks source link

Detect clang-cl as MSVC #129

Open garyttierney opened 3 years ago

garyttierney commented 3 years ago

The compiler identification checks in src/optick.h currently assume the user is on a Unix platform is compiling with Clang. This isn't the case when using Clang's MSVC compatible frontend (clang-cl).

This is a simple fix that checks for MSVC first, which both cl.exe and clang-cl.exe will identify as.

garyttierney commented 3 years ago

Fixes https://github.com/bombomby/optick/issues/104.