aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/windows-manifest.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-24 14:47:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-24 14:47:22 +0200
commitd0093238afad839adec76cb99ac0ef0657e7f87c (patch)
tree77ff14cccbd1f045ebc4b001392a10aa53fe790e /build2/cc/windows-manifest.cxx
parentfdd97d96801a0edbffae651fddc512a35a893234 (diff)
Add change flag in addition to timestamp in Windows manifest logic
Essentially the same idea as with using target_state::changed in case the timestamps are equal (due to insufficient resolution).
Diffstat (limited to 'build2/cc/windows-manifest.cxx')
-rw-r--r--build2/cc/windows-manifest.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/build2/cc/windows-manifest.cxx b/build2/cc/windows-manifest.cxx
index 3b9c649..3a62fcc 100644
--- a/build2/cc/windows-manifest.cxx
+++ b/build2/cc/windows-manifest.cxx
@@ -36,9 +36,10 @@ namespace build2
}
// Generate a Windows manifest and if necessary create/update the manifest
- // file corresponding to the exe{} target. Return the manifest file path.
+ // file corresponding to the exe{} target. Return the manifest file path
+ // as well as whether it was changed.
//
- path link::
+ pair<path, bool> link::
windows_manifest (const file& t, bool rpath_assembly) const
{
tracer trace (x, "link::windows_manifest");
@@ -108,11 +109,11 @@ namespace build2
getline (ifs, s, '\0');
if (s == m)
- return mf;
+ return make_pair (move (mf), false);
}
catch (const io_error&)
{
- // Whatever the reason we failed for , let's rewrite the file.
+ // Whatever the reason we failed for, let's rewrite the file.
}
}
@@ -130,7 +131,7 @@ namespace build2
fail << "unable to write to " << m << ": " << e;
}
- return mf;
+ return make_pair (move (mf), true);
}
}
}