Advanced Computing Platform for Theoretical Physics

commit大文件会使得服务器变得不稳定,请大家尽量只commit代码,不要commit大的文件。

uninstall.cmake 664 Bytes
Newer Older
Yu-Chen Ding's avatar
Yu-Chen Ding committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")

if(NOT EXISTS ${MANIFEST})
    message(FATAL_ERROR "Cannot find install manifest: '${MANIFEST}'")
endif()

file(STRINGS ${MANIFEST} files)
foreach(file ${files})
    file(GLOB parent_content ${file}/* ${file}/.*)
    list(LENGTH parent_content parent_len)
    while(parent_len EQUAL 0)
	message(STATUS "Removing: '${file}'")
	file(REMOVE_RECURSE ${file})
	if(EXISTS ${file})
	    MESSAGE(STATUS "'${file}' not removed")
	endif()
	get_filename_component(file ${file} DIRECTORY)
	file(GLOB parent_content ${file}/* ${file}/.*)
	list(LENGTH parent_content parent_len)
    endwhile()

endforeach(file)