Skip to content

Commit 5e38471

Browse files
anangljhedberg
authored andcommitted
modules: hal_nordic: cmake: Fix checking if uicr DT node is accessible
According to cmake documentation, in the `if(<string>)` expression the string evaluates to false unless its value is one of the true constants. Thus, the commands under `if(${uicr_path})` are never executed. Use `if(DEFINED uicr_path)` instead, since `uicr_path` is returned by `dt_nodelabel()` and it will be undefined if such node does not exist. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent ded2c49 commit 5e38471

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ endif()
118118
# doing the proper configuration sequence during system init
119119

120120
dt_nodelabel(uicr_path NODELABEL "uicr")
121-
if(${uicr_path})
121+
if(DEFINED uicr_path)
122122
dt_prop(nfct_pins_as_gpios PATH ${uicr_path} PROPERTY "nfct-pins-as-gpios")
123123
if(${nfct_pins_as_gpios})
124124
zephyr_library_compile_definitions(CONFIG_NFCT_PINS_AS_GPIOS)

0 commit comments

Comments
 (0)