pqc/.cmake/common.mk

31 wiersze
732 B
Makefile
Czysty Zwykły widok Historia

2021-03-03 06:50:25 +00:00
# Common function for defining algorithm component
2021-03-24 10:25:45 +00:00
function(define_crypto_alg name namespace src inc)
get_property(OBJ_LIBS GLOBAL PROPERTY obj_libs)
set_property(GLOBAL PROPERTY obj_libs ${OBJ_LIBS} pqclean_${name})
2021-03-03 06:50:25 +00:00
add_library(
pqclean_${name}
OBJECT
${src}
)
target_include_directories(
pqclean_${name} PRIVATE
src/common
${inc}
)
target_compile_definitions(
pqclean_${name} PRIVATE
-DPQCLEAN_NAMESPACE=${namespace}
)
endfunction()
function(define_kem_alg name namespace src inc)
2021-03-24 10:25:45 +00:00
define_crypto_alg(${name} ${namespace} "${src}" "${inc}")
2021-03-03 06:50:25 +00:00
endfunction()
function(define_sig_alg name namespace src inc)
2021-03-24 10:25:45 +00:00
define_crypto_alg(${name} ${namespace} "${src}" "${inc}")
2021-03-03 06:50:25 +00:00
endfunction()