Closed NiklasRosenstein closed 6 years ago
A similar problem is with files that are created with cmake_configure_file()
and included in C/C++ source files. Since the header file is rendered every time the build is invoked, the file timestamp changes and all edges of files that include this header are dirty.
This is no longer relevant as Craftr 3 does not export command files (it instead has a database of all commands that are then invoked by Ninja via craftr --run-action <action_id>^<action_hash>
. The hash in the command will mark the build node(s) as dirty when the action's commands, environment, input files or cwd change.
If a target must be exported into a command-file, Ninja can not easily detect when the actual command has changed. For files that we re-export every time during the build process, we need to implement some kind of hashing mechanism to tell Ninja when a target's command has changed.
The same is true for partial command-files, eg. the additional arguments exported into a file for MSVC (due to cmd command-line buffer limit).