Skip to content

Commit b334439

Browse files
committed
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.
1 parent aa561ee commit b334439

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

CMakeLists.txt

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ if(${MBED_TOOLCHAIN_FILE_USED})
5757
mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN})
5858
mbed_set_c_lib(mbed-core ${MBED_C_LIB})
5959
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB})
60+
61+
target_compile_features(mbed-core
62+
INTERFACE
63+
c_std_11
64+
cxx_std_14
65+
)
66+
6067
endif()
6168

6269
target_compile_definitions(mbed-core
@@ -136,18 +143,6 @@ else()
136143
mbed_set_linker_script(mbed-core ${LINKER_SCRIPT})
137144
endif()
138145

139-
#
140-
# Configures the application
141-
#
142-
function(mbed_configure_app_target target)
143-
# Set the language standard to use per target
144-
target_compile_features(${target}
145-
PUBLIC
146-
c_std_11
147-
cxx_std_14
148-
)
149-
endfunction()
150-
151146
#
152147
# Converts output file of `target` to binary file and to Intel HEX file.
153148
#

0 commit comments

Comments
 (0)