https://github.com/Kitware/CMake
Revision 95b9d6af80d08e795cde9f94454d2431263dd084 authored by Craig Scott on 13 June 2019, 10:57:09 UTC, committed by Craig Scott on 13 June 2019, 10:58:22 UTC
2 parent s 069e42f + c1d6b13
Raw File
Tip revision: 95b9d6af80d08e795cde9f94454d2431263dd084 authored by Craig Scott on 13 June 2019, 10:57:09 UTC
Merge branch 'cmake-gui-qt-notice' into release-3.15
Tip revision: 95b9d6a
cmake_uninstall.cmake.in
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
  message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif()

file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REPLACE "\n" ";" files "${files}")
foreach(file ${files})
  message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
  if(EXISTS "$ENV{DESTDIR}${file}")
    exec_program(
      "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
      OUTPUT_VARIABLE rm_out
      RETURN_VALUE rm_retval
      )
    if("${rm_retval}" STREQUAL 0)
    else()
      message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
    endif()
  else()
    message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
  endif()
endforeach()
back to top