Commit 7170f87
Avoid unnecessary rebuilds of test targets
Currently, all targets created by `pytest_discover_tests` will cause
a rebuild *every time* `make` / `ninja` is called, even if no files
have changed since the last build.
Quoting the CMake documentation for `add_custom_target`:
> The target has no output file and is always considered out of
> date even if the commands try to create a file with the name of
> the target. Use the add_custom_command() command to generate a
> file with dependencies.
This change should be functionally equivalent, but avoids the
indefinite rebuilds because the target will only check for the
presence of `${_tests_file}` rather than unconditionally building
it.1 parent 959fad8 commit 7170f87
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| |||
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
0 commit comments