Skip to content

Commit

Permalink
Support building w/ clang-cl
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed Jun 24, 2024
1 parent 89c28bc commit ead356e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,14 @@ target_compile_definitions(${PROJECT_NAME}
$<$<C_COMPILER_ID:MSVC>:_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)
Expand Down

0 comments on commit ead356e

Please sign in to comment.