Skip to content

Commit d9fcff7

Browse files
committed
CMake: Remove mbed-stubs-rtos-headers library
- Previous changes moved all rtos stubs headers into mbed-stubs-rtos-headers lib, but the decision to keep all stubs headers under the respective component stubs library so moved all stubs rtos headers under mbed-stubs-rtos and updated it depend component CMake - Remove unnecessary add_definition call for UNITTEST as any of the stubs library added from UNITTEST/CMakeLists.txt is not required this macro
1 parent 4e121a7 commit d9fcff7

File tree

7 files changed

+3
-12
lines changed

7 files changed

+3
-12
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ option(BUILD_TESTING "Run unit tests only." OFF)
2121

2222
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
2323
include(CTest)
24+
add_definitions(-DUNITTEST)
2425
add_subdirectory(UNITTESTS)
2526
endif()
2627

UNITTESTS/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
set(CMAKE_CXX_STANDARD 14 CACHE STRING "")
66
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "")
77

8-
add_definitions(-DUNITTEST)
9-
108
if (MINGW)
119
# enable PRIx formatting globally
1210
add_definitions(-D__STDC_FORMAT_MACROS)

UNITTESTS/stubs/connectivity/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ target_sources(mbed-stubs-connectivity
4444

4545
target_link_libraries(mbed-stubs-connectivity
4646
PRIVATE
47-
mbed-stubs-rtos-headers
4847
mbed-headers
4948
mbed-stubs-headers
5049
mbed-stubs-rtos

connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ target_link_libraries(${TEST_NAME}
2828
mbed-stubs
2929
mbed-stubs-cellular
3030
mbed-stubs-headers
31-
mbed-stubs-rtos-headers
3231
gmock_main
3332
)
3433

connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ target_link_libraries(${TEST_NAME}
3232
mbed-stubs
3333
mbed-stubs-cellular
3434
mbed-stubs-headers
35-
mbed-stubs-rtos-headers
3635
gmock_main
3736
)
3837

connectivity/cellular/tests/UNITTESTS/framework/device/cellularstatemachine/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ target_link_libraries(${TEST_NAME}
3333
mbed-stubs
3434
mbed-stubs-cellular
3535
mbed-stubs-headers
36-
mbed-stubs-rtos-headers
3736
gmock_main
3837
)
3938

rtos/tests/UNITTESTS/doubles/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@ target_include_directories(mbed-headers-rtos
99
${mbed-os_SOURCE_DIR}/rtos/include/rtos
1010
)
1111

12-
add_library(mbed-stubs-rtos-headers INTERFACE)
12+
add_library(mbed-stubs-rtos)
1313

14-
target_include_directories(mbed-stubs-rtos-headers
14+
target_include_directories(mbed-stubs-rtos
1515
INTERFACE
1616
.
1717
)
1818

19-
add_library(mbed-stubs-rtos)
20-
21-
add_definitions(-DUNITTEST)
22-
2319
target_sources(mbed-stubs-rtos
2420
PRIVATE
2521
ConditionVariable_stub.cpp

0 commit comments

Comments
 (0)