From 53307b794dd313f62a013729f5596de2cc037fc0 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 29 Sep 2023 17:36:24 +0200 Subject: [PATCH] CMake: fix build with 3rdparty module enabled through a custom config Fixes #8165 Signed-off-by: Gilles Peskine --- 3rdparty/CMakeLists.txt | 12 ++---------- ChangeLog.d/fix-cmake-3rdparty-custom-config.txt | 3 +++ 2 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 ChangeLog.d/fix-cmake-3rdparty-custom-config.txt diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 14a467457..fa149bdec 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -1,10 +1,2 @@ -execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/mbedtls_config.h get MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED RESULT_VARIABLE everest_result) -execute_process(COMMAND ${MBEDTLS_PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/../include/mbedtls/mbedtls_config.h get MBEDTLS_PSA_P256M_DRIVER_ENABLED RESULT_VARIABLE p256m_result) - -if(${everest_result} EQUAL 0) - add_subdirectory(everest) -endif() - -if(${p256m_result} EQUAL 0) - add_subdirectory(p256-m) -endif() +add_subdirectory(everest) +add_subdirectory(p256-m) diff --git a/ChangeLog.d/fix-cmake-3rdparty-custom-config.txt b/ChangeLog.d/fix-cmake-3rdparty-custom-config.txt new file mode 100644 index 000000000..ec543aafc --- /dev/null +++ b/ChangeLog.d/fix-cmake-3rdparty-custom-config.txt @@ -0,0 +1,3 @@ +Bugfix + * Fix the build with CMake when Everest or P256-m is enabled through + a user configuration file or the compiler command line. Fixes #8165.