mirror of
https://github.com/reactos/CMake.git
synced 2024-12-11 05:14:00 +00:00
9db3116226
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
23 lines
796 B
CMake
23 lines
796 B
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()
|
|
|
|
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(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()
|