diff --git a/CMakeLists.txt b/CMakeLists.txt index a7c8bedf..d12a2423 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,14 @@ target_compile_definitions(${PROJECT_NAME} $<$:_CRT_SECURE_NO_WARNINGS> ) +if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC") + target_compile_options(${PROJECT_NAME} + PRIVATE + # aead_aes256gcm_aesni requires -mssse3 when compiling w/ clang-cl. + -mssse3 + ) +endif() + # Variables that need to be exported to version.h.in set(VERSION 1.0.18) set(SODIUM_LIBRARY_VERSION_MAJOR 10)