Skip to content

Commit 8529e88

Browse files
0xc0170hugueskamba
authored andcommitted
cmake: fix present inclusion
We use only _PRESENT macros for components if they are enabled. Use the same in the mbed.h file or anywhere else.
1 parent 8016a53 commit 8529e88

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

connectivity/netsocket/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ target_sources(mbed-os-netsocket
4343
target_compile_definitions(mbed-os-netsocket
4444
INTERFACE
4545
MBED_CONF_NETSOCKET_PRESENT=1
46-
MBED_CONF_CMAKE_NETSOCKET_ENABLED=1
4746
)
4847

4948
target_link_libraries(mbed-os-netsocket

events/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ target_sources(mbed-os-events
2323
target_compile_definitions(mbed-os-events
2424
INTERFACE
2525
MBED_CONF_EVENTS_PRESENT=1
26-
MBED_CONF_CMAKE_EVENTS_ENABLED
2726
)

mbed.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,20 @@
1919

2020
#include "platform/mbed_version.h"
2121

22-
// MBED_CONF_CMAKE is temporary until tools do not set _PRESENT macros
23-
24-
#if defined(MBED_CONF_RTOS_PRESENT) && defined(MBED_CONF_CMAKE_RTOS_ENABLED)
22+
#if defined(MBED_CONF_RTOS_PRESENT)
2523
#include "rtos/rtos.h"
2624
#endif
2725

28-
#if defined(MBED_CONF_NETSOCKET_PRESENT) && defined(MBED_CONF_CMAKE_NETSOCKET_ENABLED)
26+
#if defined(MBED_CONF_NETSOCKET_PRESENT)
2927
#include "netsocket/nsapi.h"
3028
#include "netsocket/nsapi_ppp.h"
3129
#endif
3230

33-
#if defined(MBED_CONF_EVENTS_PRESENT) && defined(MBED_CONF_CMAKE_EVENTS_ENABLED)
31+
#if defined(MBED_CONF_EVENTS_PRESENT)
3432
#include "events/mbed_events.h"
3533
#endif
3634

37-
#if defined(MBED_CONF_FILESYSTEM_PRESENT) && defined(MBED_CONF_CMAKE_FILESYSTEM_ENABLED)
35+
#if defined(MBED_CONF_FILESYSTEM_PRESENT)
3836
#include "filesystem/mbed_filesystem.h"
3937
#endif
4038

rtos/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ target_sources(mbed-os
2424
target_compile_definitions(mbed-os
2525
PUBLIC
2626
MBED_CONF_RTOS_PRESENT=1
27-
MBED_CONF_CMAKE_RTOS_ENABLED=1
2827
)

storage/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ target_include_directories(mbed-os-storage
3333
target_compile_definitions(mbed-os-storage
3434
INTERFACE
3535
MBED_CONF_FILESYSTEM_PRESENT=1
36-
MBED_CONF_CMAKE_FILESYSTEM_ENABLED=1
3736
)

0 commit comments

Comments
 (0)