X-Git-Url: http://git.tdb.fi/?p=builder.git;a=blobdiff_plain;f=source%2Fbuildercli.cpp;h=0a84364c988e69bee2925f405573fcff63e66d74;hp=a37336f20e886686a7873d08947d1b6855c33f4b;hb=c7df14c38a87ceca13df47fa700d3f9fa250be91;hpb=59a8a590a7ad327d18f15fab32adee94cb8c8843 diff --git a/source/buildercli.cpp b/source/buildercli.cpp index a37336f..0a84364 100644 --- a/source/buildercli.cpp +++ b/source/buildercli.cpp @@ -191,7 +191,11 @@ int BuilderCLI::main() { FS::Path main_file = cwd/build_file; if(FS::exists(main_file)) + { builder.load_build_file(main_file, &cmdline_options, conf_all); + if(!dry_run && !cmdline_options.empty()) + builder.save_caches(); + } else if(!help) { IO::print(IO::cerr, "The file %s does not exist.\n", main_file); @@ -286,6 +290,9 @@ int BuilderCLI::main() if(build) exit_code = builder.build(jobs, dry_run, show_progress); + if(!dry_run) + builder.save_caches(); + return exit_code; }