From 062638e835d1de1be0ddf3497d1bc64cd4c0884d Mon Sep 17 00:00:00 2001 From: Rajkumar Kanagaraj Date: Wed, 23 Jun 2021 04:34:23 -0700 Subject: [PATCH] CMake: Move rtos stub headers to the rtos/tests/UNITTESTS/double directory Move rtos stubs headers to the mbed-os/rtos/tests/UNITTESTS/double directory and update CMake to create a mbed-stubs-rtos-headers library for rtos stub headers --- rtos/tests/UNITTESTS/doubles/CMakeLists.txt | 7 +++++++ .../tests/UNITTESTS/doubles}/ConditionVariable_stub.h | 0 .../tests/UNITTESTS/doubles}/Semaphore_stub.h | 0 .../stubs => rtos/tests/UNITTESTS/doubles}/Thread_stub.h | 0 4 files changed, 7 insertions(+) rename {UNITTESTS/stubs => rtos/tests/UNITTESTS/doubles}/ConditionVariable_stub.h (100%) rename {UNITTESTS/stubs => rtos/tests/UNITTESTS/doubles}/Semaphore_stub.h (100%) rename {UNITTESTS/stubs => rtos/tests/UNITTESTS/doubles}/Thread_stub.h (100%) diff --git a/rtos/tests/UNITTESTS/doubles/CMakeLists.txt b/rtos/tests/UNITTESTS/doubles/CMakeLists.txt index b3666dc5bd..7e0f604fdc 100644 --- a/rtos/tests/UNITTESTS/doubles/CMakeLists.txt +++ b/rtos/tests/UNITTESTS/doubles/CMakeLists.txt @@ -1,6 +1,13 @@ # Copyright (c) 2021 ARM Limited. All rights reserved. # SPDX-License-Identifier: Apache-2.0 +add_library(mbed-stubs-rtos-headers INTERFACE) + +target_include_directories(mbed-stubs-rtos-headers + INTERFACE + . +) + add_library(mbed-stubs-rtos) add_definitions(-DUNITTEST) diff --git a/UNITTESTS/stubs/ConditionVariable_stub.h b/rtos/tests/UNITTESTS/doubles/ConditionVariable_stub.h similarity index 100% rename from UNITTESTS/stubs/ConditionVariable_stub.h rename to rtos/tests/UNITTESTS/doubles/ConditionVariable_stub.h diff --git a/UNITTESTS/stubs/Semaphore_stub.h b/rtos/tests/UNITTESTS/doubles/Semaphore_stub.h similarity index 100% rename from UNITTESTS/stubs/Semaphore_stub.h rename to rtos/tests/UNITTESTS/doubles/Semaphore_stub.h diff --git a/UNITTESTS/stubs/Thread_stub.h b/rtos/tests/UNITTESTS/doubles/Thread_stub.h similarity index 100% rename from UNITTESTS/stubs/Thread_stub.h rename to rtos/tests/UNITTESTS/doubles/Thread_stub.h