mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-26 18:20:21 +00:00
CMake: support "make programs"
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
de4d5b7855
commit
5dab92ee4e
@ -1,3 +1,6 @@
|
||||
set(programs_target "${MBEDTLS_TARGET_PREFIX}programs")
|
||||
add_custom_target(${programs_target})
|
||||
|
||||
add_subdirectory(aes)
|
||||
add_subdirectory(cipher)
|
||||
if (NOT WIN32)
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(executables
|
||||
crypt_and_hash
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(executables
|
||||
cipher_aead_demo
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
@ -15,6 +15,7 @@ set(executables_no_common_c
|
||||
fuzz_x509csr
|
||||
fuzz_pkcs7
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables_no_common_c})
|
||||
|
||||
set(executables_with_common_c
|
||||
fuzz_privkey
|
||||
@ -23,6 +24,7 @@ set(executables_with_common_c
|
||||
fuzz_dtlsserver
|
||||
fuzz_server
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables_with_common_c})
|
||||
|
||||
foreach(exe IN LISTS executables_no_common_c executables_with_common_c)
|
||||
|
||||
|
@ -3,6 +3,7 @@ set(executables
|
||||
hello
|
||||
md_hmac_demo
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
@ -2,6 +2,7 @@ set(executables_mbedtls
|
||||
dh_client
|
||||
dh_server
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables_mbedtls})
|
||||
|
||||
foreach(exe IN LISTS executables_mbedtls)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
@ -29,6 +30,7 @@ set(executables_mbedcrypto
|
||||
rsa_verify
|
||||
rsa_verify_pss
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables_mbedcrypto})
|
||||
|
||||
foreach(exe IN LISTS executables_mbedcrypto)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
@ -6,6 +6,7 @@ set(executables
|
||||
psa_constant_names
|
||||
psa_hash
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
if(GEN_FILES)
|
||||
add_custom_command(
|
||||
|
@ -2,6 +2,7 @@ set(executables
|
||||
gen_entropy
|
||||
gen_random_ctr_drbg
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
@ -16,6 +16,7 @@ set(executables
|
||||
ssl_server
|
||||
ssl_server2
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
if(GEN_FILES)
|
||||
# Inform CMake that the following file will be generated as part of the build
|
||||
|
@ -8,12 +8,14 @@ set(executables_libs
|
||||
selftest
|
||||
udp_proxy
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables_libs})
|
||||
|
||||
set(executables_mbedcrypto
|
||||
benchmark
|
||||
query_compile_time_config
|
||||
zeroize
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables_mbedcrypto})
|
||||
|
||||
if(TEST_CPP)
|
||||
set(cpp_dummy_build_cpp "${CMAKE_CURRENT_BINARY_DIR}/cpp_dummy_build.cpp")
|
||||
|
@ -6,6 +6,7 @@ set(executables
|
||||
pem2der
|
||||
strerror
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
@ -10,6 +10,7 @@ set(executables
|
||||
load_roots
|
||||
req_app
|
||||
)
|
||||
add_dependencies(${programs_target} ${executables})
|
||||
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
|
Loading…
Reference in New Issue
Block a user