Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing CMakeLists for non-x86 architectures #792

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,26 @@ endif()

# Use processor extensions
# TODO: add exception if non-x86 platform
if (MSVC)
# The test will run only for x86-64 and AMD64 architectures
if (MSVC AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
add_compile_definitions(HAVE_INTRIN_H)
add_compile_definitions(USE_SSE2)
add_compile_definitions(HAVE_WMMINTRIN_H)
add_compile_definitions(HAVE_TMMINTRIN_H)
else()
if (SSE)
message(STATUS "Using SSE instructions")
if (SSE AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
message(STATUS "Using SSE instructions")
add_compile_definitions(HAVE_X86INTRIN_H)
add_compile_definitions(HAVE_TMMINTRIN_H)
add_compile_options(-mssse3 -mpclmul)
add_compile_definitions(HAVE_TMMINTRIN_H)
add_compile_options(-mssse3 -mpclmul)
endif()

if (SSE OR AESNI)
add_compile_definitions(HAVE_WMMINTRIN_H)
add_compile_definitions(HAVE_WMMINTRIN_H)
endif()
if (AESNI)
add_compile_options(-maes)

if (AESNI AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64" )
add_compile_options(-maes)
endif()
endif()

Expand Down
Loading