Очистка каталога проекта от сгенерированных файлов
This commit is contained in:
parent
959a730ec6
commit
4164852959
@ -12,3 +12,18 @@ if(${_source_realpath} STREQUAL ${_binary_realpath})
|
||||
message(FATAL_ERROR "In-source builds are not allowed.")
|
||||
endif()
|
||||
|
||||
# Очистка от сгенерированных файлов
|
||||
file(GLOB_RECURSE _cmakelists_files RELATIVE ${_source_realpath} CMakeLists.txt)
|
||||
foreach(_it ${_cmakelists_files})
|
||||
get_filename_component(_file ${_it} REALPATH)
|
||||
get_filename_component(_dir ${_file} DIRECTORY)
|
||||
file(REMOVE_RECURSE
|
||||
${_dir}/CMakeFiles
|
||||
${_dir}/CMakeCache.txt
|
||||
${_dir}/cmake_install.cmake
|
||||
${_dir}/Makefile
|
||||
${_dir}/build.ninja
|
||||
${_dir}/rules.ninja
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user