cmake: Allow C standard version to be overriden
Allow archs/boards/apps to override the C standard version. Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
parent
0de49e5d40
commit
c2882410ed
|
@ -120,8 +120,6 @@ zephyr_compile_options(
|
|||
)
|
||||
|
||||
zephyr_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:-std=c99>
|
||||
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-std=c++11>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-fcheck-new>
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-ffunction-sections>
|
||||
|
@ -992,6 +990,13 @@ get_property(GKSF GLOBAL PROPERTY GENERATED_KERNEL_SOURCE_FILES)
|
|||
get_property(TOPT GLOBAL PROPERTY TOPT)
|
||||
set_ifndef( TOPT -T)
|
||||
|
||||
get_property(CSTD GLOBAL PROPERTY CSTD)
|
||||
set_ifndef(CSTD c99)
|
||||
|
||||
zephyr_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:C>:-std=${CSTD}>
|
||||
)
|
||||
|
||||
configure_file(
|
||||
$ENV{ZEPHYR_BASE}/include/arch/arm/cortex_m/scripts/app_data_alignment.ld
|
||||
${PROJECT_BINARY_DIR}/include/generated/app_data_alignment.ld)
|
||||
|
|
Loading…
Reference in a new issue