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})
list(APPEND ${FILE_DTS} ${test_file})
if(DEFINED FILE_BUILD)
set(deprecated_file_found y)
endif()
if(FILE_NAMES)
break()
endif()
@ -2601,6 +2605,11 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
if(EXISTS ${test_file})
list(APPEND ${FILE_KCONF} ${test_file})
if(DEFINED FILE_BUILD)
set(deprecated_file_found y)
endif()
if(FILE_NAMES)
break()
endif()
@ -2622,6 +2631,11 @@ Relative paths are only allowed with `-D${ARGV1}=<path>`")
"please read the Zephyr documentation on application development."
)
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()
endfunction()