Skip to content

Commit

Permalink
[cpu] set AES definition on MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: r4sas <[email protected]>
  • Loading branch information
r4sas committed Aug 10, 2023
1 parent 7a8aa37 commit ebe9fd9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,15 @@ endif()
# Note: AES-NI and AVX is available on x86-based CPU's.
# Here also ARM64 implementation, but currently we don't support it.
# MSVC is not supported.
if(MSVC)
message(STATUS "AES-NI is not supported on MSVC, option was disabled")
set(WITH_AESNI OFF)
endif()
#if(MSVC)
# message(STATUS "AES-NI is not supported on MSVC, option was disabled")
# set(WITH_AESNI OFF)
#endif()

if(WITH_AESNI AND (ARCHITECTURE MATCHES "x86_64" OR ARCHITECTURE MATCHES "i386"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
endif()
add_definitions(-D__AES__)
endif()

Expand Down

0 comments on commit ebe9fd9

Please sign in to comment.