GLOB gives absolute paths unless a relative path is specified.
file(GLOB SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS "xyz/*.cpp") message("${SOURCES}") list(REMOVE_ITEM SOURCES "xyz/src1.cpp") message("${SOURCES}")