Skip to content

Commit 41e471d

Browse files
ananglcvinayak
authored andcommitted
[nrf fromlist] 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]> Upstream PR: zephyrproject-rtos/zephyr#63929
1 parent 2410ec1 commit 41e471d

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
@@ -116,7 +116,7 @@ endif()
116116
# doing the proper configuration sequence during system init
117117

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

0 commit comments

Comments
 (0)