Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move hal stubs to hal directory #14827

Merged
merged 4 commits into from
Jul 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
)