diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-05-15 15:13:06 +0100 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2018-06-03 21:06:23 +0000 |
commit | 7a15214a69891411df6f55a74851d502ef0b24c5 (patch) | |
tree | bd4952ff75aec26f2b5f6d05543e7f5d46a0b546 /run_unittests.py | |
parent | 7e08e958c0e3cdf7e6769027d8eeff5925b69d73 (diff) | |
download | meson-7a15214a69891411df6f55a74851d502ef0b24c5.zip meson-7a15214a69891411df6f55a74851d502ef0b24c5.tar.gz meson-7a15214a69891411df6f55a74851d502ef0b24c5.tar.bz2 |
Have the windows.resource_compiler() preprocesor write a depfile
When using binutils's windres, we can instruct it to invoke the preprocessor
in such a way that it writes a depfile, so that dependencies on #included
files are automatically tracked.
Not implemented for MSVC tools, so skip testing it in that case.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py index b599a5f..0814b34 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2397,9 +2397,15 @@ class WindowsTests(BasePlatformTests): self.build() # Immediately rebuilding should not do anything self.assertBuildIsNoop() - # Changing mtime of sample.ico should rebuild everything + # Changing mtime of sample.ico should rebuild prog self.utime(os.path.join(testdir, 'res', 'sample.ico')) self.assertRebuiltTarget('prog') + # Changing mtime of resource.h should rebuild myres.rc and then prog + # (resource compiler depfile generation is not yet implemented for msvc) + env = Environment(testdir, self.builddir, get_fake_options(self.prefix), []) + if env.detect_c_compiler(False).get_id() != 'msvc': + self.utime(os.path.join(testdir, 'inc', 'resource', 'resource.h')) + self.assertRebuiltTarget('prog') class LinuxlikeTests(BasePlatformTests): |