Skip to content

Commit ee57dcd

Browse files
rajkan01hugueskamba
andcommitted
Apply suggestions from code review
Co-authored-by: Hugues Kamba <[email protected]>
1 parent 3d35701 commit ee57dcd

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ add_subdirectory(cmsis/device/rtos EXCLUDE_FROM_ALL)
124124
# Configures the application
125125
#
126126
function(mbed_configure_app_target target)
127-
mbed_set_language_standard(${target})
127+
# Set the language standard to use per target
128+
target_compile_features(${target}
129+
PUBLIC
130+
c_std_11
131+
cxx_std_14
132+
)
128133
endfunction()
129134

130135
#

connectivity/drivers/mbedtls/FEATURE_CRYPTOCELL310/TARGET_MCU_NRF52840/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
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)
5+
set(LIBCC_310_EXT ./TOOLCHAIN_GCC_ARM/libcc_310_ext.a)
6+
set(LIBCC_310_TRNG ./TOOLCHAIN_GCC_ARM/libcc_310_trng.a)
77
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)
8+
set(LIBCC_310_EXT ./TOOLCHAIN_ARM/libcc_310_ext.ar)
9+
set(LIBCC_310_TRNG ./TOOLCHAIN_ARM/libcc_310_trng.ar)
1010
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)
11+
set(LIBCC_310_EXT ./TOOLCHAIN_IAR/lib_cc310_ext.a)
12+
set(LIBCC_310_TRNG ./TOOLCHAIN_IAR/lib_cc310_trng.a)
1313
endif()
1414

1515
target_include_directories(mbed-mbedtls-cryptocell310
@@ -24,6 +24,6 @@ target_sources(mbed-mbedtls-cryptocell310
2424

2525
target_link_libraries(mbed-mbedtls-cryptocell310
2626
INTERFACE
27-
./${LIBCC_310_EXT}
28-
./${LIBCC_310_TRNG}
27+
${LIBCC_310_EXT}
28+
${LIBCC_310_TRNG}
2929
)

connectivity/drivers/mbedtls/FEATURE_CRYPTOCELL310/binaries/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
5-
set(LIBCC_310_CORE TOOLCHAIN_GCC_ARM/libcc_310_core.a)
5+
set(LIBCC_310_CORE ./TOOLCHAIN_GCC_ARM/libcc_310_core.a)
66
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
7-
set(LIBCC_310_CORE TOOLCHAIN_ARM/libcc_310_core.ar)
7+
set(LIBCC_310_CORE ./TOOLCHAIN_ARM/libcc_310_core.ar)
88
elseif(${MBED_TOOLCHAIN} STREQUAL "IAR")
9-
set(LIBCC_310_CORE TOOLCHAIN_IAR/lib_cc310_ext.a)
9+
set(LIBCC_310_CORE ./TOOLCHAIN_IAR/lib_cc310_ext.a)
1010
endif()
1111

1212
target_link_libraries(mbed-mbedtls-cryptocell310
1313
INTERFACE
14-
${CMAKE_CURRENT_SOURCE_DIR}/${LIBCC_310_CORE}
14+
${LIBCC_310_CORE}
1515
)

tools/cmake/toolchain.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,6 @@ set(CMAKE_CROSSCOMPILING TRUE)
4646
set(CMAKE_C_COMPILER_WORKS TRUE)
4747
set(CMAKE_CXX_COMPILER_WORKS TRUE)
4848

49-
# Set the language standard to use per target
50-
function(mbed_set_language_standard target)
51-
target_compile_features(${target}
52-
INTERFACE
53-
c_std_11
54-
cxx_std_14
55-
)
56-
endfunction()
57-
5849
# Clear toolchains options for all languages as Mbed OS uses
5950
# different initialisation options (such as for optimization and debug symbols)
6051
set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING "" FORCE)

0 commit comments

Comments
 (0)