zephyr/share/zephyrunittest-package/cmake/pristine.cmake

22 lines
715 B
CMake

# SPDX-License-Identifier: Apache-2.0
# Purpose of this CMake file is to clean all CMake files generated by CMake when
# exporting Zephry to CMake user package registry.
# Get a list of all files.
file(GLOB_RECURSE GENERATED_FILES
LIST_DIRECTORIES true
${CMAKE_CURRENT_LIST_DIR}/*
)
# Remove the files that is used be Zephyr from the list.
list(REMOVE_ITEM GENERATED_FILES
"${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
"${CMAKE_CURRENT_LIST_DIR}/pristine.cmake"
"${CMAKE_CURRENT_LIST_DIR}/ZephyrUnittestConfigVersion.cmake"
"${CMAKE_CURRENT_LIST_DIR}/ZephyrUnittestConfig.cmake"
)
# Delete everything else, as those files are created by CMake.
file(REMOVE_RECURSE ${GENERATED_FILES})