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.
pull/14265/head
Martin Kojtal 2021-02-10 10:30:11 +00:00
parent aa561ee8f5
commit b3344390dd
1 changed files with 7 additions and 12 deletions

View File

@ -57,6 +57,13 @@ if(${MBED_TOOLCHAIN_FILE_USED})
mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN}) mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN})
mbed_set_c_lib(mbed-core ${MBED_C_LIB}) mbed_set_c_lib(mbed-core ${MBED_C_LIB})
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB}) mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
target_compile_features(mbed-core
INTERFACE
c_std_11
cxx_std_14
)
endif() endif()
target_compile_definitions(mbed-core target_compile_definitions(mbed-core
@ -136,18 +143,6 @@ else()
mbed_set_linker_script(mbed-core ${LINKER_SCRIPT}) mbed_set_linker_script(mbed-core ${LINKER_SCRIPT})
endif() 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. # Converts output file of `target` to binary file and to Intel HEX file.
# #