[wesnoth-commits] [wesnoth/wesnoth] eab006: CMake: avoid unnecessarily remaking all .mo files ...

Steve Cotton noreply at github.com
Sat Feb 13 10:43:46 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: eab006f02c784953e948f5359d6e10965236df34
      https://github.com/wesnoth/wesnoth/commit/eab006f02c784953e948f5359d6e10965236df34
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2021-02-13 (Sat, 13 Feb 2021)

  Changed paths:
    M po/CMakeLists.txt

  Log Message:
  -----------
  CMake: avoid unnecessarily remaking all .mo files on each build

All the .mo files had a dependency on the target directory, which meant that
every change to the timestamp of that directory caused all the files to be
remade; and each file remade caused a change to the directory's timestamp ...

Since CMake 3.0, "cmake -E make_directory" has been deprecated in favor of
"file(MAKE_DIRECTORY ...)", so use that instead of the custom command. This
means the directories are created when the cmake config is generated, instead
of during the subsequent make steps.

Note: the mo-update target which builds the .mo files is only run when the
build is configured with ENABLE_NLS=ON. Both before and after this change,
none of the .mo files are rebuilt when ENABLE_NLS=OFF.





More information about the Commits mailing list