diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-09-26 23:58:44 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-09-26 23:58:44 +0300 |
commit | 3fcca74e340e23b88444748efd792df91a81da63 (patch) | |
tree | ee2418a09f9a745fa4f633041f7b2f72a4209991 /mesonbuild/backend | |
parent | 534e94ffc35dae3a0b2cc9f1e60e7e452872c512 (diff) | |
download | meson-vsmodtest.zip meson-vsmodtest.tar.gz meson-vsmodtest.tar.bz2 |
Q&D experiment to scan and build C++ modules with VS.vsmodtest
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 417f6d9..6323830 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -328,11 +328,14 @@ int dummy; self.write_rules(outfile) self.write_builds(outfile) - default = 'default all\n\n' + + default = 'default fakeall\n\n' outfile.write(default) # Only overwrite the old build file after the new one has been # fully created. os.replace(tempfilename, outfilename) + import shutil + shutil.copy(outfilename, outfilename + '.hackbak') self.generate_compdb() # http://clang.llvm.org/docs/JSONCompilationDatabase.html @@ -2685,6 +2688,13 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) self.add_build(elem) # Alias that runs the target defined above self.create_target_alias('meson-uninstall') + cmd = self.environment.get_build_command() + ['--internal', 'scanhack'] + elem = NinjaBuildElement(self.all_outputs, 'meson-fakeall', 'CUSTOM_COMMAND', 'PHONY') + elem.add_item('COMMAND', cmd) + elem.add_item('pool', 'console') + self.add_build(elem) + # Alias that runs the target defined above + self.create_target_alias('meson-fakeall') def generate_ending(self): targetlist = [] |