CMakeLists.txt 1.08 KB
Newer Older
Enrico Pozzobon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
cmake_minimum_required (VERSION 3.3.2)
project (ISAP)

############################
#   CHOOSE ISAP INSTANCE   #
############################

add_definitions(-DISAP128)
#add_definitions(-DISAP128A)

##########################
#   CHOOSE PERMUTATION   #
##########################

#add_definitions(-DASCON)
add_definitions(-DKECCAKP400)

########################
#   EN/DISABLE DEBUG   #
########################

add_definitions(-DDEBUG=0)
#add_definitions(-DDEBUG=1)

########################
#   COMPILE COMMANDS   #
########################

#set(CMAKE_C_FLAGS "-std=c99 -Wall -Wextra -Wshadow -fsanitize=address,undefined -O2")
set(CMAKE_C_FLAGS "-march=native -O3 -DNDEBUG")

add_library(
  CRYPTO_AEAD
  STATIC
  crypto_aead.c
  isap.c
  permutation.c
  lib/KeccakP-400-reference/KeccakP-400-reference.c
  lib/Ascon-reference/Ascon-reference.c
)
set_target_properties(CRYPTO_AEAD PROPERTIES OUTPUT_NAME "isap")

add_executable(EXE_GENKAT_AEAD genkat_aead.c)
target_link_libraries(EXE_GENKAT_AEAD CRYPTO_AEAD)
set_target_properties(EXE_GENKAT_AEAD PROPERTIES OUTPUT_NAME "genkat_aead" SUFFIX "")