diff --git a/tools/cmakev2/component.cmake b/tools/cmakev2/component.cmake index 3136ef2d394..746d6d9c982 100644 --- a/tools/cmakev2/component.cmake +++ b/tools/cmakev2/component.cmake @@ -106,12 +106,8 @@ function(__get_component_paths) idf_die("OUTPUT option is required") endif() - set(include_paths "") - set(exclude_paths "") __get_absolute_paths(PATHS "${ARG_PATHS}" OUTPUT include_paths) - if(DEFINED ARG_EXCLUDE_PATHS) - __get_absolute_paths(PATHS "${ARG_EXCLUDE_PATHS}" OUTPUT exclude_paths) - endif() + __get_absolute_paths(PATHS "${ARG_EXCLUDE_PATHS}" OUTPUT exclude_paths) if(ARG_CHECK) foreach(path IN LISTS include_paths) diff --git a/tools/cmakev2/utilities.cmake b/tools/cmakev2/utilities.cmake index dd678924844..34ef335de6e 100644 --- a/tools/cmakev2/utilities.cmake +++ b/tools/cmakev2/utilities.cmake @@ -147,14 +147,14 @@ function(__get_absolute_paths) set(multi_value PATHS) cmake_parse_arguments(ARG "${options}" "${one_value}" "${multi_value}" ${ARGN}) - if(NOT DEFINED ARG_PATHS) - idf_die("PATHS option is required") - endif() - if(NOT DEFINED ARG_OUTPUT) idf_die("OUTPUT option is required") endif() + if(NOT DEFINED ARG_PATHS) + set(ARG_PATHS "") + endif() + set(absolute_paths "") foreach(path IN LISTS ARG_PATHS) get_filename_component(path_abs ${path} ABSOLUTE)