asmtk icon indicating copy to clipboard operation
asmtk copied to clipboard

Fixed Clang on Windows detection

Open cafeed28 opened this issue 6 months ago • 0 comments

Compiling asmtk on Windows with Clang produces compile errors:

clang++: error: unknown argument: '-Zc:inline'
clang++: error: unknown argument: '-Zc:strictStrings'
clang++: error: unknown argument: '-Zc:threadSafeInit-'

They are caused by incorrect detection of MSVC-compatible frontend, CMAKE_CXX_COMPILER_FRONTEND_VARIANT should be used instead of CMAKE_CXX_SIMULATE_ID, see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_FRONTEND_VARIANT.html and https://discourse.cmake.org/t/how-to-determine-if-clang-or-clang-cl-is-used-on-windows/4129/5

cafeed28 avatar Aug 15 '25 19:08 cafeed28