From 7b2fae2be91e0213888cc06dd8d058c3a9903c9d Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Mon, 7 Oct 2024 12:09:58 +0200 Subject: [PATCH] cmake: Remove partial support for partial use CMake build system Let the projects using some CMakeLists.txt files without the top CMakeLists.txt define the variables that the top CMakeLists.txt set for all. Signed-off-by: Ronald Cron --- library/CMakeLists.txt | 7 ------- tests/CMakeLists.txt | 7 ------- tf-psa-crypto/tests/CMakeLists.txt | 7 ------- 3 files changed, 21 deletions(-) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 5cb5ec860f..5b75b6460c 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -1,10 +1,3 @@ -# Set the project root directory if it's not already defined, as may happen if -# the library folder is included directly by a parent project, without -# including the top level CMakeLists.txt. -if(NOT DEFINED MBEDTLS_DIR) - set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR}) -endif() - set(src_x509 pkcs7.c x509.c diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4e90bffb3a..a9d5c842b8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -3,13 +3,6 @@ set(libs ${CMAKE_THREAD_LIBS_INIT} ) -# Set the project root directory if it's not already defined, as may happen if -# the tests folder is included directly by a parent project, without including -# the top level CMakeLists.txt. -if(NOT DEFINED MBEDTLS_DIR) - set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR}) -endif() - if(NOT MBEDTLS_PYTHON_EXECUTABLE) message(FATAL_ERROR "Cannot build test suites without Python 3") endif() diff --git a/tf-psa-crypto/tests/CMakeLists.txt b/tf-psa-crypto/tests/CMakeLists.txt index 862d8623b0..4755cae73d 100644 --- a/tf-psa-crypto/tests/CMakeLists.txt +++ b/tf-psa-crypto/tests/CMakeLists.txt @@ -3,13 +3,6 @@ set(libs ${CMAKE_THREAD_LIBS_INIT} ) -# Set the project root directory if it's not already defined, as may happen if -# the tests folder is included directly by a parent project, without including -# the top level CMakeLists.txt. -if(NOT DEFINED MBEDTLS_DIR) - set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR}) -endif() - if(NOT TF_PSA_CRYPTO_PYTHON_EXECUTABLE) message(FATAL_ERROR "Cannot build test suites without Python 3") endif()