Skip to content

Commit 84bb4cc

Browse files
committed
CMake: Move hal stubs sources to the mbed-os/hal directory
Move the hal stubs into the hal component directory. so we can avoid duplicating the mbed-os source tree in a central UNITTESTS folder.
1 parent b5c2f70 commit 84bb4cc

File tree

8 files changed

+9
-1
lines changed

8 files changed

+9
-1
lines changed

UNITTESTS/stubs/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ target_include_directories(mbed-stubs-headers
109109

110110
add_subdirectory(connectivity)
111111
add_subdirectory(events)
112-
add_subdirectory(hal)
113112
add_subdirectory(platform)
114113
add_subdirectory(storage)
115114

hal/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
5+
add_subdirectory(tests/UNITTESTS)
6+
endif()
7+
48
add_subdirectory(TARGET_FLASH_CMSIS_ALGO EXCLUDE_FROM_ALL)
59

610
add_subdirectory(usb)

hal/tests/.mbedignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UNITTESTS/*

hal/tests/UNITTESTS/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
add_subdirectory(doubles)

0 commit comments

Comments
 (0)