diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-02-11 15:50:16 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-02-11 15:50:16 +0100 |
commit | f78310f4886bad7029cc039971159ab7a97e00af (patch) | |
tree | c1609e42197af649ab52888a0c50186218f7a3d8 /cmake/cmake_uninstall.cmake.in | |
parent | 5f3ee106ad32e07e8d00513212eb0968a84b59a1 (diff) | |
download | ouroboros-f78310f4886bad7029cc039971159ab7a97e00af.tar.gz ouroboros-f78310f4886bad7029cc039971159ab7a97e00af.zip |
Initial build infrastructure
Contains the initial build infrastructure. Cmake was chosen for
portability reasons.
Diffstat (limited to 'cmake/cmake_uninstall.cmake.in')
-rw-r--r-- | cmake/cmake_uninstall.cmake.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/cmake_uninstall.cmake.in b/cmake/cmake_uninstall.cmake.in new file mode 100644 index 00000000..4c07dc7b --- /dev/null +++ b/cmake/cmake_uninstall.cmake.in @@ -0,0 +1,21 @@ +if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") +endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + +file(READ "@CMAKE_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}") + exec_program( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE 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) |