initial version of SQIsign
Co-authored-by: Jorge Chavez-Saab <jorgechavezsaab@gmail.com> Co-authored-by: Maria Corte-Real Santos <36373796+mariascrs@users.noreply.github.com> Co-authored-by: Luca De Feo <github@defeo.lu> Co-authored-by: Jonathan Komada Eriksen <jonathan.eriksen97@gmail.com> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Antonin Leroux <18654258+tonioecto@users.noreply.github.com> Co-authored-by: Patrick Longa <plonga@microsoft.com> Co-authored-by: Lorenz Panny <lorenz@yx7.cc> Co-authored-by: Francisco Rodríguez-Henríquez <francisco.rodriguez@tii.ae> Co-authored-by: Sina Schaeffler <108983332+syndrakon@users.noreply.github.com> Co-authored-by: Benjamin Wesolowski <19474926+Calodeon@users.noreply.github.com>
This commit is contained in:
39
.cmake/target.cmake
Normal file
39
.cmake/target.cmake
Normal file
@@ -0,0 +1,39 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm64")
|
||||
add_definitions(-DTARGET_ARM64)
|
||||
add_definitions(-DRADIX_64)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
|
||||
add_definitions(-DTARGET_ARM)
|
||||
add_definitions(-DRADIX_32)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
|
||||
add_definitions(-DTARGET_AMD64)
|
||||
add_definitions(-DRADIX_64)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i386" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i686")
|
||||
add_definitions(-DTARGET_X86)
|
||||
add_definitions(-DRADIX_32)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^(s390x.*|S390X.*)")
|
||||
add_definitions(-DTARGET_S390X)
|
||||
add_definitions(-DTARGET_BIG_ENDIAN)
|
||||
add_definitions(-DRADIX_64)
|
||||
else()
|
||||
add_definitions(-DTARGET_OTHER)
|
||||
add_definitions(-DRADIX_64)
|
||||
message("Warning: system architecture not detected, defaulting to 64 bit")
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
add_definitions(-DTARGET_OS_UNIX)
|
||||
else()
|
||||
add_definitions(-DTARGET_OS_OTHER)
|
||||
endif()
|
||||
|
||||
set(C_OPT_FLAGS "")
|
||||
|
||||
if ((NOT DEFINED SQISIGN_BUILD_TYPE))
|
||||
set(SQISIGN_BUILD_TYPE opt)
|
||||
endif()
|
||||
|
||||
if ((NOT DEFINED SQISIGN_TEST_REPS))
|
||||
set(SQISIGN_TEST_REPS 1000)
|
||||
endif()
|
||||
Reference in New Issue
Block a user