@@ -53,15 +53,23 @@ function(cth_glob OUT_VAR)
5353 set (GLOB_PATTERNS ${ARG_PATTERNS} )
5454 endif ()
5555
56- if (GLOB_PATTERNS)
56+ # Normalize paths to prevent CONFIGURE_DEPENDS cache mismatch issues on Windows
57+ set (NORMALIZED_PATTERNS "" )
58+ foreach (PATTERN IN LISTS GLOB_PATTERNS)
59+ cmake_path (ABSOLUTE_PATH PATTERN NORMALIZE OUTPUT_VARIABLE NORMALIZED )
60+ list (APPEND NORMALIZED_PATTERNS "${NORMALIZED} " )
61+ endforeach ()
62+
63+ if (NORMALIZED_PATTERNS)
5764 file (GLOB_RECURSE FOUND_FILES
5865 CONFIGURE_DEPENDS
59- ${GLOB_PATTERNS }
66+ ${NORMALIZED_PATTERNS }
6067 )
6168 set (${OUT_VAR} ${${OUT_VAR} } ${FOUND_FILES} PARENT_SCOPE )
6269 endif ()
6370endfunction ()
6471
72+
6573#[[ .rst:
6674.. command:: cth_glob_cpp
6775
@@ -463,7 +471,7 @@ endfunction()
463471 - Uncrustify will look for an uncrustify.cfg file in the working directory or rely on the UNCRUSTIFY_CONFIG environment variable.
464472
465473 .. seealso::
466- - ``cth_find_uncrustify(OPTIONAL)`` from fm_tool_utilities to locate uncrustify optionally
474+ - ``cth_find_uncrustify(OPTIONAL)`` from cth_tool_utilities to locate uncrustify optionally
467475
468476#]]
469477function (cth_add_uncrustify_target TARGET_NAME )
@@ -481,7 +489,7 @@ function(cth_add_uncrustify_target TARGET_NAME)
481489 set (FILES_TO_FORMAT ${ARG_UNPARSED_ARGUMENTS} )
482490 cth_assert_not_empty ("${FILES_TO_FORMAT} " REASON "no files provided" )
483491
484- include (fm_tool_utilities )
492+ include (cth_tool_utilities )
485493
486494 cth_find_uncrustify (${FIND_OPTIONAL_ARG} )
487495 if (NOT UNCRUSTIFY_EXECUTABLE)
0 commit comments