https://github.com/Kitware/CMake
Revision 43316424d0f33d6dc12ae5d1d4528603e8f0fab9 authored by Brad King on 07 June 2019, 15:16:04 UTC, committed by Brad King on 07 June 2019, 15:16:04 UTC
2 parent s 1f46693 + 00e6b67
Raw File
Tip revision: 43316424d0f33d6dc12ae5d1d4528603e8f0fab9 authored by Brad King on 07 June 2019, 15:16:04 UTC
Merge branch 'autogen_header_in_symbolic_path_fix' into release-3.15
Tip revision: 4331642
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