second-round version of SQIsign
Co-authored-by: Marius A. Aardal <marius.andre.aardal@gmail.com> Co-authored-by: Gora Adj <gora.adj@tii.ae> Co-authored-by: Diego F. Aranha <dfaranha@cs.au.dk> Co-authored-by: Andrea Basso <sqisign@andreabasso.com> Co-authored-by: Isaac Andrés Canales Martínez <icanalesm0500@gmail.com> Co-authored-by: Jorge Chávez-Saab <jorgechavezsaab@gmail.com> Co-authored-by: Maria Corte-Real Santos <mariascrsantos98@gmail.com> Co-authored-by: Luca De Feo <github@defeo.lu> Co-authored-by: Max Duparc <max.duparc@epfl.ch> Co-authored-by: Jonathan Komada Eriksen <jonathan.eriksen97@gmail.com> Co-authored-by: Décio Luiz Gazzoni Filho <decio@decpp.net> Co-authored-by: Basil Hess <bhe@zurich.ibm.com> Co-authored-by: Antonin Leroux <antonin.leroux@polytechnique.org> Co-authored-by: Patrick Longa <plonga@microsoft.com> Co-authored-by: Luciano Maino <mainoluciano.96@gmail.com> Co-authored-by: Michael Meyer <michael@random-oracles.org> Co-authored-by: Hiroshi Onuki <onuki@mist.i.u-tokyo.ac.jp> Co-authored-by: Lorenz Panny <lorenz@yx7.cc> Co-authored-by: Giacomo Pope <giacomopope@gmail.com> Co-authored-by: Krijn Reijnders <reijnderskrijn@gmail.com> Co-authored-by: Damien Robert <damien.robert@inria.fr> Co-authored-by: Francisco Rodríguez-Henriquez <francisco.rodriguez@tii.ae> Co-authored-by: Sina Schaeffler <sschaeffle@student.ethz.ch> Co-authored-by: Benjamin Wesolowski <benjamin.wesolowski@ens-lyon.fr>
This commit is contained in:
committed by
Lorenz Panny
parent
ff34a8cd18
commit
91e9e464fe
@@ -1,48 +1,59 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(SQIsign VERSION 1.0 LANGUAGES C ASM)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(SQIsign VERSION 2.0 LANGUAGES C ASM)
|
||||
|
||||
set(SQISIGN_SO_VERSION "0")
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
include(CTest)
|
||||
|
||||
option(ENABLE_STRICT "Build with strict compile options." OFF)
|
||||
option(ENABLE_STRICT "Build with strict compile options." ON)
|
||||
option(ENABLE_TESTS "Enable compilation of tests." ON)
|
||||
option(ENABLE_CT_TESTING "Enable compilation for constant time testing." OFF)
|
||||
option(ENABLE_GMP_BUILD "Download and build external version of GMP" OFF)
|
||||
option(ENABLE_DOC_TARGET "Enable building API documentation using doxygen" OFF)
|
||||
option(ENABLE_SIGN "Build with sign functionality" ON)
|
||||
set(GMP_LIBRARY "SYSTEM" CACHE STRING "Which version of GMP to use: SYSTEM, BUILD or MINI")
|
||||
set(GF_RADIX "AUTO" CACHE STRING "Set the radix for the gf module (currently supported values: 32 or 64), or AUTO.")
|
||||
|
||||
if (NOT DEFINED SQISIGN_BUILD_TYPE)
|
||||
SET(SQISIGN_BUILD_TYPE "ref")
|
||||
SET(SQISIGN_BUILD_TYPE "ref")
|
||||
endif()
|
||||
|
||||
if(SQISIGN_BUILD_TYPE STREQUAL "broadwell")
|
||||
SET(SVARIANT_S "lvl1")
|
||||
else()
|
||||
SET(SVARIANT_S "lvl1;lvl3;lvl5")
|
||||
if (${SQISIGN_BUILD_TYPE} MATCHES "ref")
|
||||
add_compile_definitions(SQISIGN_BUILD_TYPE_REF SQISIGN_GF_IMPL_REF)
|
||||
elseif (${SQISIGN_BUILD_TYPE} MATCHES "opt")
|
||||
add_compile_definitions(SQISIGN_BUILD_TYPE_OPT SQISIGN_GF_IMPL_REF)
|
||||
elseif (${SQISIGN_BUILD_TYPE} MATCHES "broadwell")
|
||||
add_compile_definitions(SQISIGN_BUILD_TYPE_BROADWELL SQISIGN_GF_IMPL_BROADWELL)
|
||||
elseif (${SQISIGN_BUILD_TYPE} MATCHES "arm64crypto")
|
||||
add_compile_definitions(SQISIGN_BUILD_TYPE_ARM64CRYPTO SQISIGN_GF_IMPL_REF)
|
||||
endif()
|
||||
|
||||
SET(SVARIANT_S "lvl1;lvl3;lvl5")
|
||||
|
||||
include(.cmake/flags.cmake)
|
||||
include(.cmake/sanitizers.cmake)
|
||||
include(.cmake/target.cmake)
|
||||
if(ENABLE_DOC_TARGET)
|
||||
include(.cmake/target_docs.cmake)
|
||||
if(ENABLE_SIGN)
|
||||
include(.cmake/gmpconfig.cmake)
|
||||
add_compile_definitions(ENABLE_SIGN)
|
||||
endif()
|
||||
include(.cmake/gmpconfig.cmake)
|
||||
|
||||
set(BM_BINS "" CACHE INTERNAL "List of benchmark binaries")
|
||||
|
||||
set(SELECT_IMPL_TYPE ${PROJECT_SOURCE_DIR}/.cmake/impl_type.cmake)
|
||||
set(SELECT_SQISIGN_VARIANT ${PROJECT_SOURCE_DIR}/.cmake/sqisign_variant.cmake)
|
||||
|
||||
set(INC_PUBLIC ${PROJECT_SOURCE_DIR}/include)
|
||||
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(apps)
|
||||
add_subdirectory(test)
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
include(.cmake/bm.cmake)
|
||||
|
||||
#if(ENABLE_TESTS)
|
||||
# enable_testing()
|
||||
# add_subdirectory(test)
|
||||
#endif()
|
||||
|
||||
Reference in New Issue
Block a user