aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/cmake_uninstall.cmake.in
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-11-13 21:53:22 -0800
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-11-14 14:10:09 -0800
commita69ab0c23a0c38e3fed3e412df36538d8959d23c (patch)
treee6669a138dad84f79c46588f43a38c69dda90246 /host/cmake/cmake_uninstall.cmake.in
parent4247f025020d7dd1f696dfbd3cce248957d6ace7 (diff)
downloaduhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.tar.gz
uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.tar.bz2
uhd-a69ab0c23a0c38e3fed3e412df36538d8959d23c.zip
cmake: Update coding style to use lowercase commands
Also updates our coding style file. Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code (with GNU compliant sed): cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done > convert.sed \ && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \ '*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed (Make sure the backslashes don't get mangled!)
Diffstat (limited to 'host/cmake/cmake_uninstall.cmake.in')
-rw-r--r--host/cmake/cmake_uninstall.cmake.in46
1 files changed, 23 insertions, 23 deletions
diff --git a/host/cmake/cmake_uninstall.cmake.in b/host/cmake/cmake_uninstall.cmake.in
index b4d731a14..c22bb4a10 100644
--- a/host/cmake/cmake_uninstall.cmake.in
+++ b/host/cmake/cmake_uninstall.cmake.in
@@ -1,34 +1,34 @@
# http://www.vtk.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F
-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")
+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(EXISTS "$ENV{DESTDIR}${file}")
- EXEC_PROGRAM(
+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(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(
+ 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}")
-ENDFOREACH(file)
+ 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}")
+endforeach(file)