From 9f25fa20ce79d99e1bb66765e2b9b5afcea44014 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Wed, 14 Jun 2023 10:24:51 +0200 Subject: [PATCH] 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 --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09815b66445..b2b8da8f74c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -896,13 +896,13 @@ zephyr_get_include_directories_for_lang(C STRIP_PREFIX # Don't use a -I prefix ) -if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC) - set(number_of_dynamic_devices ${CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM}) -else() - set(number_of_dynamic_devices 0) -endif() - if(CONFIG_HAS_DTS) + if(CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC) + set(number_of_dynamic_devices ${CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM}) + else() + set(number_of_dynamic_devices 0) + endif() + # dev_handles.c is generated from ${ZEPHYR_LINK_STAGE_EXECUTABLE} by # gen_handles.py add_custom_command(