From b63064854ba5ef21f1b1d6ff4ebcb1b93617b723 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sat, 14 Sep 2024 12:18:00 +0200 Subject: [PATCH] CMake: support "make ssl-opt" to just build what ssl-opt.sh needs This also suffices for compat.sh. Include the sample programs in this build. They aren't tested by ssl-opt.sh yet, but they soon will be. Signed-off-by: Gilles Peskine --- programs/CMakeLists.txt | 3 +++ programs/ssl/CMakeLists.txt | 1 + programs/test/CMakeLists.txt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index aaf93ba38d..e031544a9c 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -1,6 +1,9 @@ set(programs_target "${MBEDTLS_TARGET_PREFIX}programs") add_custom_target(${programs_target}) +set(ssl_opt_target "${MBEDTLS_TARGET_PREFIX}ssl-opt") +add_custom_target(${ssl_opt_target}) + add_subdirectory(aes) add_subdirectory(cipher) if (NOT WIN32) diff --git a/programs/ssl/CMakeLists.txt b/programs/ssl/CMakeLists.txt index f4fb477ebf..02010d8a7f 100644 --- a/programs/ssl/CMakeLists.txt +++ b/programs/ssl/CMakeLists.txt @@ -17,6 +17,7 @@ set(executables ssl_server2 ) add_dependencies(${programs_target} ${executables}) +add_dependencies(${ssl_opt_target} ${executables}) if(GEN_FILES) # Inform CMake that the following file will be generated as part of the build diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index f25dd7a54c..928ab49b28 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -9,6 +9,7 @@ set(executables_libs udp_proxy ) add_dependencies(${programs_target} ${executables_libs}) +add_dependencies(${ssl_opt_target} udp_proxy) set(executables_mbedcrypto benchmark @@ -16,6 +17,7 @@ set(executables_mbedcrypto zeroize ) add_dependencies(${programs_target} ${executables_mbedcrypto}) +add_dependencies(${ssl_opt_target} query_compile_time_config) if(TEST_CPP) set(cpp_dummy_build_cpp "${CMAKE_CURRENT_BINARY_DIR}/cpp_dummy_build.cpp")