Skip to content

Commit 3d35701

Browse files
committed
Incorporated the review comments from ROB
1 parent 22d926f commit 3d35701

File tree

8 files changed

+33
-65
lines changed

8 files changed

+33
-65
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ if(${MBED_TOOLCHAIN_FILE_USED})
6767
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
6868
endif()
6969

70-
71-
set(MBED_TARGET_LABELS
72-
${MBED_TARGET_LABELS} CACHE INTERNAL ""
73-
)
74-
7570
target_compile_definitions(mbed-core
7671
INTERFACE
7772
${MBED_TARGET_DEFINITIONS}

connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_MCU_NRF52840/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,16 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
function(_mbed_get_libcc_310_ext)
5-
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
6-
set(LIBCC_310_EXT TOOLCHAIN_GCC_ARM/libcc_310_ext.a)
7-
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8-
set(LIBCC_310_EXT TOOLCHAIN_ARM/libcc_310_ext.ar)
9-
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
10-
set(LIBCC_310_EXT TOOLCHAIN_IAR/lib_cc310_ext.a)
11-
endif()
12-
target_link_libraries(mbed-mbedtls-cryptocell310
13-
INTERFACE
14-
./${LIBCC_310_EXT}
15-
)
16-
endfunction()
17-
18-
function(_mbed_get_libcc_310_trng)
19-
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
20-
set(LIBCC_310_TRNG TOOLCHAIN_GCC_ARM/libcc_310_trng.a)
21-
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
22-
set(LIBCC_310_TRNG TOOLCHAIN_ARM/libcc_310_trng.ar)
23-
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
24-
set(LIBCC_310_TRNG TOOLCHAIN_IAR/lib_cc310_trng.a)
25-
endif()
26-
target_link_libraries(mbed-mbedtls-cryptocell310
27-
INTERFACE
28-
./${LIBCC_310_TRNG}
29-
)
30-
endfunction()
31-
32-
_mbed_get_libcc_310_ext()
33-
_mbed_get_libcc_310_trng()
4+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5+
set(LIBCC_310_EXT TOOLCHAIN_GCC_ARM/libcc_310_ext.a)
6+
set(LIBCC_310_TRNG TOOLCHAIN_GCC_ARM/libcc_310_trng.a)
7+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8+
set(LIBCC_310_EXT TOOLCHAIN_ARM/libcc_310_ext.ar)
9+
set(LIBCC_310_TRNG TOOLCHAIN_ARM/libcc_310_trng.ar)
10+
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
11+
set(LIBCC_310_EXT TOOLCHAIN_IAR/lib_cc310_ext.a)
12+
set(LIBCC_310_TRNG TOOLCHAIN_IAR/lib_cc310_trng.a)
13+
endif()
3414

3515
target_include_directories(mbed-mbedtls-cryptocell310
3616
INTERFACE
@@ -40,4 +20,10 @@ target_include_directories(mbed-mbedtls-cryptocell310
4020
target_sources(mbed-mbedtls-cryptocell310
4121
INTERFACE
4222
crypto_device_platform.c
43-
)
23+
)
24+
25+
target_link_libraries(mbed-mbedtls-cryptocell310
26+
INTERFACE
27+
./${LIBCC_310_EXT}
28+
./${LIBCC_310_TRNG}
29+
)
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
function(_mbed_get_libcc_310_core)
5-
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
6-
set(LIBCC_310_CORE TOOLCHAIN_GCC_ARM/libcc_310_core.a)
7-
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
8-
set(LIBCC_310_CORE TOOLCHAIN_ARM/libcc_310_core.ar)
9-
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
10-
set(LIBCC_310_CORE TOOLCHAIN_IAR/lib_cc310_ext.a)
11-
endif()
12-
target_link_libraries(mbed-mbedtls-cryptocell310
13-
INTERFACE
14-
${CMAKE_CURRENT_SOURCE_DIR}/${LIBCC_310_CORE}
15-
)
16-
endfunction()
4+
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5+
set(LIBCC_310_CORE TOOLCHAIN_GCC_ARM/libcc_310_core.a)
6+
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
7+
set(LIBCC_310_CORE TOOLCHAIN_ARM/libcc_310_core.ar)
8+
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
9+
set(LIBCC_310_CORE TOOLCHAIN_IAR/lib_cc310_ext.a)
10+
endif()
1711

18-
_mbed_get_libcc_310_core()
12+
target_link_libraries(mbed-mbedtls-cryptocell310
13+
INTERFACE
14+
${CMAKE_CURRENT_SOURCE_DIR}/${LIBCC_310_CORE}
15+
)

connectivity/netsocket/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
# TODO CMake: Perhaps move this/these file(s)
4+
# TODO CMake: Perhaps move this/these file(s) into connectivity/drivers/cellular
55
target_sources(mbed-cellular
66
INTERFACE
77
source/CellularNonIPSocket.cpp

tools/cmake/toolchain.cmake

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,10 @@ set(CMAKE_CXX_COMPILER_WORKS TRUE)
4848

4949
# Set the language standard to use per target
5050
function(mbed_set_language_standard target)
51-
set_target_properties(${target}
52-
PROPERTIES
53-
C_STANDARD 11
54-
C_STANDARD_REQUIRED YES
55-
C_EXTENSIONS YES
56-
)
57-
58-
set_target_properties(${target}
59-
PROPERTIES
60-
CXX_STANDARD 14
61-
CXX_STANDARD_REQUIRED YES
62-
CXX_EXTENSIONS YES
51+
target_compile_features(${target}
52+
INTERFACE
53+
c_std_11
54+
cxx_std_14
6355
)
6456
endfunction()
6557

0 commit comments

Comments
 (0)