[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] applications/PyHLA CMakeLists.txt cmake_uninsta...
From: |
CERTI CVS commits |
Subject: |
[certi-cvs] applications/PyHLA CMakeLists.txt cmake_uninsta... |
Date: |
Tue, 26 Jul 2011 10:15:21 +0000 |
CVSROOT: /sources/certi
Module name: applications
Changes by: Eric NOULARD <erk> 11/07/26 10:15:21
Modified files:
PyHLA : CMakeLists.txt
Added files:
PyHLA : cmake_uninstall.cmake.in
Log message:
Add Uninstall target.
Contribution from Charles on the ML.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/CMakeLists.txt?cvsroot=certi&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/applications/PyHLA/cmake_uninstall.cmake.in?cvsroot=certi&rev=1.1
Patches:
Index: CMakeLists.txt
===================================================================
RCS file: /sources/certi/applications/PyHLA/CMakeLists.txt,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- CMakeLists.txt 16 Mar 2011 12:33:34 -0000 1.14
+++ CMakeLists.txt 26 Jul 2011 10:15:21 -0000 1.15
@@ -78,4 +78,8 @@
INCLUDE(CPack)
-# $Id: CMakeLists.txt,v 1.14 2011/03/16 12:33:34 erk Exp $
+### Uninstall ###
+configure_file("${CMAKE_HOME_DIRECTORY}/cmake_uninstall.cmake.in"
"cmake_uninstall.cmake" IMMEDIATE @ONLY)
+add_custom_target(uninstall "${CMAKE_COMMAND}" -P "cmake_uninstall.cmake")
+
+# $Id: CMakeLists.txt,v 1.15 2011/07/26 10:15:21 erk Exp $
Index: cmake_uninstall.cmake.in
===================================================================
RCS file: cmake_uninstall.cmake.in
diff -N cmake_uninstall.cmake.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ cmake_uninstall.cmake.in 26 Jul 2011 10:15:21 -0000 1.1
@@ -0,0 +1,22 @@
+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(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ IF("${rm_retval}" STREQUAL 0)
+ ELSE("${rm_retval}" STREQUAL 0)
+ MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
+ ENDIF("${rm_retval}" STREQUAL 0)
+ ELSE(EXISTS "$ENV{DESTDIR}${file}")
+ MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
+ ENDIF(EXISTS "$ENV{DESTDIR}${file}")
+ENDFOREACH(file)
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] applications/PyHLA CMakeLists.txt cmake_uninsta...,
CERTI CVS commits <=