Debian Codegraph @

podofo/cmake_uninstall.cmake.in

raw
1 if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
2 message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
3 endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
4
5 file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
6 string(REGEX REPLACE "\n" ";" files "${files}")
7 foreach(file ${files})
8 message(STATUS "Uninstalling \"${file}\"")
9 if(NOT EXISTS "${file}")
10 message(FATAL_ERROR "File \"${file}\" does not exists.")
11 endif(NOT EXISTS "${file}")
12 exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"${file}\""
13 OUTPUT_VARIABLE rm_out
14 RETURN_VARIABLE rm_retval)
15 if("${rm_retval}" GREATER 0)
16 message(FATAL_ERROR "Problem when removing \"${file}\"")
17 endif("${rm_retval}" GREATER 0)
18 endforeach(file)