-
Notifications
You must be signed in to change notification settings - Fork 3
Fix tests failing in release build #11
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
Changes from 5 commits
abd681e
5ac0a66
d716197
ca9eeba
a60261f
7833fa2
a079363
740a58a
9f6155a
58209fe
c05da77
166d37a
530c239
3ecaae6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| build/ | ||
| .DS_Store | ||
| .idea/ | ||
| .venv |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,7 +1,20 @@ | ||||||||||||||||||||||||
| cmake_minimum_required(VERSION 3.16) | ||||||||||||||||||||||||
| project(mpt-crypto C CXX) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| # --- Find Dependencies --- | ||||||||||||||||||||||||
| # --- 1. Global Architecture Detection --- | ||||||||||||||||||||||||
| include(CheckTypeSize) | ||||||||||||||||||||||||
| check_type_size("unsigned __int128" HAVE_INT128_T) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| if (HAVE_INT128_T OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64" | ||||||||||||||||||||||||
| OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") | ||||||||||||||||||||||||
| message(STATUS "Build: Detected 64-bit system. Enforcing 64-bit arithmetic globally.") | ||||||||||||||||||||||||
| add_compile_definitions(USE_SCALAR_4X64 USE_FIELD_5X52 HAVE___INT128) | ||||||||||||||||||||||||
| else () | ||||||||||||||||||||||||
| message(STATUS "Build: Detected 32-bit system. Enforcing generic arithmetic globally.") | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
| if (HAVE_INT128_T OR CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64" | |
| OR CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") | |
| message(STATUS "Build: Detected 64-bit system. Enforcing 64-bit arithmetic globally.") | |
| add_compile_definitions(USE_SCALAR_4X64 USE_FIELD_5X52 HAVE___INT128) | |
| else () | |
| message(STATUS "Build: Detected 32-bit system. Enforcing generic arithmetic globally.") | |
| if (HAVE_INT128_T) | |
| message(STATUS "Build: Detected compiler support for unsigned __int128. Enforcing 64-bit arithmetic backend.") | |
| add_compile_definitions(USE_SCALAR_4X64 USE_FIELD_5X52 HAVE___INT128) | |
| else () | |
| message(STATUS "Build: No unsigned __int128 support detected. Using generic 32-bit arithmetic backend.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated CMakeLists.txt to use the definitions that actually exist in the source.
mathbunnyru marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
mathbunnyru marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.