From f3eb33fbd4d16ef567b9e456c6c70052b4673581 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Fri, 7 Aug 2020 14:09:51 +0200 Subject: invoke update-mime-database with -n it only updates the database iff there's new files and is specifically meant for post-install invocation. since cmake only installs files when they actually changed this effectively turns repeated cmake --install calls noop as far as database updates are concerned this stops all sources with mimetype definitions from rebuilding the mime database on every install even when nothing changed. it saves literal seconds every install call -n was introduced in 1.4 which is like 6 years old and there are no pratcically relevant distribution versions around with older versions --- find-modules/FindSharedMimeInfo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'find-modules') diff --git a/find-modules/FindSharedMimeInfo.cmake b/find-modules/FindSharedMimeInfo.cmake index 0969b721..0b8dec9c 100644 --- a/find-modules/FindSharedMimeInfo.cmake +++ b/find-modules/FindSharedMimeInfo.cmake @@ -81,7 +81,7 @@ set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") if (NOT DESTDIR_VALUE) # under Windows relative paths are used, that's why it runs from CMAKE_INSTALL_PREFIX message(STATUS \"Updating MIME database at \${CMAKE_INSTALL_PREFIX}/${_xdgmimeDir}\") - execute_process(COMMAND \"${UPDATE_MIME_DATABASE_EXECUTABLE}\" \"${_xdgmimeDir}\" + execute_process(COMMAND \"${UPDATE_MIME_DATABASE_EXECUTABLE}\" -n \"${_xdgmimeDir}\" WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}\") endif (NOT DESTDIR_VALUE) ") -- cgit v1.2.1