Skip to content

Commit

Permalink
Merge pull request #14827 from ARMmbed/move_hal_stubs
Browse files Browse the repository at this point in the history
Move hal stubs to hal directory
  • Loading branch information
0xc0170 authored Jul 1, 2021
2 parents b5c2f70 + 26c608b commit d0c4468
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 14 deletions.
8 changes: 0 additions & 8 deletions UNITTESTS/stubs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ add_library(mbed-headers-base INTERFACE)
add_library(mbed-headers-platform INTERFACE)
add_library(mbed-headers-connectivity INTERFACE)
add_library(mbed-headers-storage INTERFACE)
add_library(mbed-headers-hal INTERFACE)
add_library(mbed-headers-events INTERFACE)

target_link_libraries(mbed-headers
Expand Down Expand Up @@ -89,12 +88,6 @@ target_include_directories(mbed-headers-events
${mbed-os_SOURCE_DIR}/events/include/events/internal
)

target_include_directories(mbed-headers-hal
INTERFACE
${mbed-os_SOURCE_DIR}/hal
${mbed-os_SOURCE_DIR}/hal/include
)

target_include_directories(mbed-headers
INTERFACE
${mbed-os_SOURCE_DIR}/features
Expand All @@ -109,7 +102,6 @@ target_include_directories(mbed-stubs-headers

add_subdirectory(connectivity)
add_subdirectory(events)
add_subdirectory(hal)
add_subdirectory(platform)
add_subdirectory(storage)

Expand Down
4 changes: 4 additions & 0 deletions hal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Copyright (c) 2020-2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
add_subdirectory(tests/UNITTESTS)
endif()

add_subdirectory(TARGET_FLASH_CMSIS_ALGO EXCLUDE_FROM_ALL)

add_subdirectory(usb)
Expand Down
1 change: 1 addition & 0 deletions hal/tests/.mbedignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UNITTESTS/*
4 changes: 4 additions & 0 deletions hal/tests/UNITTESTS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(doubles)
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

add_library(mbed-headers-hal INTERFACE)

target_include_directories(mbed-headers-hal
INTERFACE
${mbed-os_SOURCE_DIR}/hal
${mbed-os_SOURCE_DIR}/hal/include
)

add_library(mbed-stubs-hal)

target_compile_definitions(mbed-stubs-hal
Expand All @@ -17,13 +25,10 @@ target_sources(mbed-stubs-hal
watchdog_api_stub.c
)

target_link_options(mbed-stubs-hal
PRIVATE
--coverage
)

target_link_libraries(mbed-stubs-hal
PRIVATE
mbed-headers
mbed-headers-base
mbed-headers-hal
mbed-headers-platform
mbed-stubs-headers
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d0c4468

Please sign in to comment.