aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2006-09-09 13:30:56 +0000
committerLaurent Montel <montel@kde.org>2006-09-09 13:30:56 +0000
commit021d3b8ee8ef0c246e539090899a43e7cef16539 (patch)
treeb2ccddbd4abc9c5f61af4b0655c7084e29c00a9d
parentc778596920e0d5357f216c885e35b4f97d371a23 (diff)
downloadextra-cmake-modules-021d3b8ee8ef0c246e539090899a43e7cef16539.tar.gz
extra-cmake-modules-021d3b8ee8ef0c246e539090899a43e7cef16539.tar.bz2
Add macro to remove obsolete cmake file
(not necessary to duplicate (in the future) code) svn path=/trunk/KDE/kdelibs/; revision=582465
-rw-r--r--modules/KDE4Macros.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 63a19671..bc7db283 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -668,3 +668,15 @@ MACRO(KDE4_ADD_DCOP_STUBS)
Please remove it and port to DBUS.")
ENDMACRO(KDE4_ADD_DCOP_STUBS)
+MACRO(KDE4_REMOVE_OBSOLETE_CMAKE_FILES _file_to_remove)
+# the files listed here will be removed by remove_obsoleted_cmake_files.cmake, Alex
+ install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake )
+
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "#generated by cmake, dont edit\n\n")
+ foreach ( _current_FILE ${_file_to_remove})
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "message(STATUS \"Removing ${module_install_dir}/${_current_FILE}\" )\n" )
+ file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/remove_files.cmake "exec_program( ${CMAKE_COMMAND} ARGS -E remove ${module_install_dir}/${_current_FILE} OUTPUT_VARIABLE _dummy)\n" )
+ endforeach ( _current_FILE)
+
+ENDMACRO(KDE4_REMOVE_OBSOLETE_CMAKE_FILES _file)
+