From b3344390dd6107372dfb8ed6576e9857dc949081 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Wed, 10 Feb 2021 10:30:11 +0000 Subject: [PATCH] CMake: move language standard to mbed-core We set language standard via mbed-core and app inherits it if links to it. This is breaking change for application, please remove the function call from an application and it should build without errors. --- CMakeLists.txt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aef5509bd1..79ac33c37b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,13 @@ if(${MBED_TOOLCHAIN_FILE_USED}) mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN}) mbed_set_c_lib(mbed-core ${MBED_C_LIB}) mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB}) + + target_compile_features(mbed-core + INTERFACE + c_std_11 + cxx_std_14 + ) + endif() target_compile_definitions(mbed-core @@ -136,18 +143,6 @@ else() mbed_set_linker_script(mbed-core ${LINKER_SCRIPT}) endif() -# -# Configures the application -# -function(mbed_configure_app_target target) - # Set the language standard to use per target - target_compile_features(${target} - PUBLIC - c_std_11 - cxx_std_14 - ) -endfunction() - # # Converts output file of `target` to binary file and to Intel HEX file. #