cmake: modules: extensions: Deprecate build type

Adds a deprecation notice if a file is found which has the build
type informing the user of the replacement

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2024-01-31 08:26:38 +00:00 committed by Carles Cufí
parent f7f320c494
commit 5bf056046a

View file

@ -2574,6 +2574,10 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
if(EXISTS ${test_file}) if(EXISTS ${test_file})
list(APPEND ${FILE_DTS} ${test_file}) list(APPEND ${FILE_DTS} ${test_file})
if(DEFINED FILE_BUILD)
set(deprecated_file_found y)
endif()
if(FILE_NAMES) if(FILE_NAMES)
break() break()
endif() endif()
@ -2601,6 +2605,11 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
if(EXISTS ${test_file}) if(EXISTS ${test_file})
list(APPEND ${FILE_KCONF} ${test_file}) list(APPEND ${FILE_KCONF} ${test_file})
if(DEFINED FILE_BUILD)
set(deprecated_file_found y)
endif()
if(FILE_NAMES) if(FILE_NAMES)
break() break()
endif() endif()
@ -2622,6 +2631,11 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
"please read the Zephyr documentation on application development." "please read the Zephyr documentation on application development."
) )
endif() endif()
if(deprecated_file_found)
message(DEPRECATION "prj_<build>.conf was deprecated after Zephyr 3.5,"
" you should switch to using -DFILE_SUFFIX instead")
endif()
endif() endif()
endfunction() endfunction()
@ -4279,7 +4293,7 @@ function(zephyr_linker_dts_section)
if(DTS_SECTION_UNPARSED_ARGUMENTS) if(DTS_SECTION_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "zephyr_linker_dts_section(${ARGV0} ...) given unknown " message(FATAL_ERROR "zephyr_linker_dts_section(${ARGV0} ...) given unknown "
"arguments: ${DTS_SECTION_UNPARSED_ARGUMENTS}" "arguments: ${DTS_SECTION_UNPARSED_ARGUMENTS}"
) )
endif() endif()