Procházet zdrojové kódy

CMake: Translations: Build byproduct before output

This can lead to an inconsistent state otherwise, with the
output being updated and the byproduct not; for example,
when the build was manually interrupted.
Julian Andres Klode před 10 roky
rodič
revize
c43a7ed46c
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      CMake/Translations.cmake

+ 4 - 4
CMake/Translations.cmake

@@ -72,14 +72,14 @@ function(apt_add_translation_domain)
     # of .mo files.
     # of .mo files.
     add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot
     add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot
         BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp
         BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp
-        COMMAND msgcomm --more-than=0 --sort-by-file
-                         ${sh_pot}
-                         ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot
-                         --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot
         COMMAND msgcomm --more-than=0 --omit-header --sort-by-file --add-location=file
         COMMAND msgcomm --more-than=0 --omit-header --sort-by-file --add-location=file
                          ${sh_pot}
                          ${sh_pot}
                          ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot
                          ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot
                          --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0
                          --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0
+        COMMAND msgcomm --more-than=0 --sort-by-file
+                         ${sh_pot}
+                         ${CMAKE_CURRENT_BINARY_DIR}/${domain}.c.pot
+                         --output=${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot
         COMMAND cmake -E copy_if_different
         COMMAND cmake -E copy_if_different
                          ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0
                          ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp0
                          ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp
                          ${CMAKE_CURRENT_BINARY_DIR}/${domain}.pot-tmp