diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2016-06-29 15:30:43 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-08-01 18:44:35 -0700 |
commit | 4503c7e6287e4204af946c9aa6e669f76c9b8289 (patch) | |
tree | 234cf66bb621688828c2ef51979dd7c99cf8637d /host/cmake/cmake_uninstall.cmake.in | |
parent | 2bf61143605a075583def1038fdcbb9e62f4c244 (diff) | |
download | uhd-4503c7e6287e4204af946c9aa6e669f76c9b8289.tar.gz uhd-4503c7e6287e4204af946c9aa6e669f76c9b8289.tar.bz2 uhd-4503c7e6287e4204af946c9aa6e669f76c9b8289.zip |
cmake: "make uninstall" now removes symlinks (CMake 2.8.1 and above)
Diffstat (limited to 'host/cmake/cmake_uninstall.cmake.in')
-rw-r--r-- | host/cmake/cmake_uninstall.cmake.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/host/cmake/cmake_uninstall.cmake.in b/host/cmake/cmake_uninstall.cmake.in index 6031a6ca9..b4d731a14 100644 --- a/host/cmake/cmake_uninstall.cmake.in +++ b/host/cmake/cmake_uninstall.cmake.in @@ -17,6 +17,17 @@ FOREACH(file ${files}) IF(NOT "${rm_retval}" STREQUAL 0) MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") ENDIF(NOT "${rm_retval}" STREQUAL 0) + ELSEIF(NOT "${CMAKE_VERSION}" STRLESS "2.8.1") + IF(IS_SYMLINK "$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) + ENDIF(IS_SYMLINK "$ENV{DESTDIR}${file}") ELSE(EXISTS "$ENV{DESTDIR}${file}") MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") ENDIF(EXISTS "$ENV{DESTDIR}${file}") |