Back to home page

EIC code displayed by LXR

 
 

    


Warning, /jana2/src/python/externals/pybind11-2.10.3/tools/cmake_uninstall.cmake.in is written in an unsupported language. File is not indexed.

0001 # Source: https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake
0002 
0003 if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
0004   message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
0005 endif()
0006 
0007 file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
0008 string(REGEX REPLACE "\n" ";" files "${files}")
0009 foreach(file ${files})
0010   message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
0011   if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
0012     exec_program(
0013       "@CMAKE_COMMAND@" ARGS
0014       "-E remove \"$ENV{DESTDIR}${file}\""
0015       OUTPUT_VARIABLE rm_out
0016       RETURN_VALUE rm_retval)
0017     if(NOT "${rm_retval}" STREQUAL 0)
0018       message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
0019     endif()
0020   else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
0021     message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
0022   endif()
0023 endforeach()