Skip to content

Commit 1b7c720

Browse files
tejlmandcfriedt
authored andcommitted
cmake: prefix local version of return variable
Fixes: #55490 Follow-up: #53124 Prefix local version of the return variable before calling `zephyr_check_compiler_flag_hardcoded()`. This ensures that there will never be any naming collision between named return argument and the variable name used in later functions when PARENT_SCOPE is used. The issue #55490 provided description of situation where the double de-referencing was not working correctly. Signed-off-by: Torsten Rasmussen <[email protected]> (cherry picked from commit 599886a)
1 parent 58af1b5 commit 1b7c720

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/extensions.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,9 +1003,9 @@ endfunction()
10031003
function(zephyr_check_compiler_flag lang option check)
10041004
# Check if the option is covered by any hardcoded check before doing
10051005
# an automated test.
1006-
zephyr_check_compiler_flag_hardcoded(${lang} "${option}" ${check} exists)
1006+
zephyr_check_compiler_flag_hardcoded(${lang} "${option}" _${check} exists)
10071007
if(exists)
1008-
set(${check} ${${check}} PARENT_SCOPE)
1008+
set(${check} ${_${check}} PARENT_SCOPE)
10091009
return()
10101010
endif()
10111011

0 commit comments

Comments
 (0)