Skip to content

Commit 9f25fa2

Browse files
gmarullnashif
authored andcommitted
device: set number_of_dynamic_devices only if needed
This variable is only needed when gen_handles.py is called, so define it under the if() above. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent f651292 commit 9f25fa2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -896,13 +896,13 @@ zephyr_get_include_directories_for_lang(C
896896
STRIP_PREFIX # Don't use a -I prefix
897897
)
898898

899-
if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC)
900-
set(number_of_dynamic_devices ${CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM})
901-
else()
902-
set(number_of_dynamic_devices 0)
903-
endif()
904-
905899
if(CONFIG_HAS_DTS)
900+
if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC)
901+
set(number_of_dynamic_devices ${CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM})
902+
else()
903+
set(number_of_dynamic_devices 0)
904+
endif()
905+
906906
# dev_handles.c is generated from ${ZEPHYR_LINK_STAGE_EXECUTABLE} by
907907
# gen_handles.py
908908
add_custom_command(

0 commit comments

Comments
 (0)