mirror of
https://agent.ghink.cloud/wb2osz/direwolf
synced 2025-04-18 20:39:31 +00:00
Per the cmake documentation: > *Changed in version 3.28:* This command is available only if policy CMP0153 > is not set to NEW. Port projects to the execute_process() command. > > *Deprecated since version 3.0:* Use the execute_process() command instead. To avoid warnings or future errors, calls to `exec_program()` have been replaced with the recommended `execute_process()` command.
22 lines
1.0 KiB
CMake
22 lines
1.0 KiB
CMake
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(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
|
|
|
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
|
string(REGEX REPLACE "\n" ";" files "${files}")
|
|
foreach(file ${files})
|
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
|
execute_process(
|
|
COMMAND "@CMAKE_COMMAND@" -E remove "$ENV{DESTDIR}${file}"
|
|
OUTPUT_VARIABLE rm_out
|
|
RESULT_VARIABLE rm_retval
|
|
)
|
|
if(NOT "${rm_retval}" STREQUAL 0)
|
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
|
endif(NOT "${rm_retval}" STREQUAL 0)
|
|
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
|
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
|
endforeach(file)
|